[Python] imread throws [WARN] can't open/read file: check file path/integrity

Discussão em 'Python' iniciado por Stack, Abril 29, 2025.

  1. Stack

    Stack Membro Participativo

    what can i do?

    WARN:0@0.726] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('pythonProject6/arrow.jpg'): can't open/read file: check file path/integrity

    Traceback (most recent call last):
    File "C:\Users\PC2\PycharmProjects\pythonProject6\whatsapp try.py", line 17, in <module>
    cv2.imshow("image", img)
    cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-

    python\opencv\modules\highgui\src\window.cpp:967: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'


    import cv2

    img = cv2.imread("pythonProject6/arrow.jpg")

    #print(img.shape)

    cv2.imshow("image", img)
    cv2.waitkey(0)

    Continue reading...

Compartilhe esta Página