-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Cannot upload by imread() files containing char "–" in name #17600
Copy link
Copy link
Open
Description
System information (version)
- OpenCV => opencv-python 4.2.0.34
- Operating System / Platform => Windows-10-10.0.18362-SP0
- Compiler => Visual Studio 1.46.1, Python 3.7.4 32-bit
Detailed description
When I upload file containing in name char – U+2013 : EN DASH by cv2.imread(), file is not uploaded.
Example of invalid name:
Artboard 1 copy 11 – 10.png
Steps to reproduce
Png files
Code:
# This one works
img1 = cv2.imread("images/referance/Artboard 1 copy 11 1.png")
height, width, channel = img1.shape
print(height, width, channel)
# This one does not
img2 = cv2.imread("images/referance/Artboard 1 copy 11 – 10.png")
height, width, channel = img2.shape
print(height, width, channel)
Terminal output (powershell)
1280 720 3
Traceback (most recent call last):
File "wrong_path.py", line 8, in <module>
height, width, channel = img2.shape
AttributeError: 'NoneType' object has no attribute 'shape'
Reactions are currently unavailable