May-17-2020, 07:03 PM
Hi,
I was wondering if someone can explain this issue I'm having.
So practically, when I run the following code:
However, when I change the code to this:
FileNotFoundError: [Errno 2] No such file or directory:
I really can't figure out what I am doing wrong.
Thanks.
I was wondering if someone can explain this issue I'm having.
So practically, when I run the following code:
from PIL import Image from os import listdir for picture in listdir('New_folder'): print(picture)the code runs fine and gives me the correct output.
However, when I change the code to this:
for picture in listdir('New_folder'): img = Image.open(picture) img.show()I get the following error:
FileNotFoundError: [Errno 2] No such file or directory:
I really can't figure out what I am doing wrong.
Thanks.