I have a file named negative.py
inside the cselect folder. Why is there an error in vs code when the path I used is
image = cv.imread('images/tooth.jpeg')
height, width, channels = image.shape
The error:
Traceback (most recent call last):
File "d:\Users\iveej\Desktop\cs\python\cselect\negative.py", line 7, in <module>
height, width, channels = image.shape
AttributeError: 'NoneType' object has no attribute 'shape'
But when I changed the path to:
image = cv.imread('D:\\Users\\iveej\\Desktop\\cs\\python\\cselect\\images\\tooth.jpeg')
it's working.
Both work in Pycharm but not in vs code. Why is that? Thank you for answering in advance.