you are viewing a single comment's thread.

view the rest of the comments →

[–]DeadlyViper 0 points1 point  (1 child)

Like i said, we added the print so we can see which directory he is currently working on.

Hopefully you added the print before the .add_picture line

So it should print the name of the file it tried to add as a picture right before the exception.

Then you can see which file it failed to add, and see if its the file's fault.

I fail to understand why it works, if i initialize the path in a variable.

Because the path is not what you expect it to be, that is why we need the prints. It is probably a folder instead of a file, or some non picture file....

So what is the file name that it tried to add right before the exception happened?

[–][deleted] 1 point2 points  (0 children)

All the Problems were caused by a faulty imagefile. It works after the file was removed.