Reputation: 1
logo = Image.open('file.png')
the error says "No such file or directory found." will update when i find a fix, or someone replies with a successful fix. thank you everyone.
The error is that the file is not in the same area as the project file, so the solution was to insert the full directory. Thank you!
Upvotes: 0
Views: 830
Reputation: 731
The error is occurring because file.png
may not be in the same directory as that of the working directory.
A simple fix would be to use raw string and paste the full directory (e.g. for windows -> C:\Users...).
logo = Image.open(r'C:\Users\Username\Desktop\file.png') # Make sure to use 'r' to index raw string, if not the Python would not recognize backslash as a string
Upvotes: 1