Unhandled exception in script file not found

Viewed 21

I am new to Python and have just made my first app. It is a simple password manager app that stores the data structure in a .txt file. I used the Tkinter library to create my GUI and everything is working as expected. Compiling the 5 .py file into a single .exe file had no errors, but when I try to run it I get the error "Unhandeled exception in script" more specifically: _tkinter.TclError: couldn't open "C:\Users\cohen\AppData\Local\Temp_MEI96962\base_library.zip\lock_and_key.ppm" no such file or directory.

I did use a custom image to replace the window icon of the program and it is included within the same folder as the .py file. I have tried many suggested solutions from other stackoverflow posts, but nothing seems to work. I have tried both root.iconbitmap(file path to .ico file) and I have also tried using root.tk.call('wm', 'iconphoto', root._w, filepath to .ppm file). I checked the base_library.zip file mentioned in the path for my icon files and they were not there so I tried manually adding them there and still the same error that it can't find the file.

I have no other ideas as to why this is the case, tutorials on this step online didn't seem to do anything different.

EDIT: As requested here is a screenshot of the error and part of the code in question.

Error

Code

0 Answers
Related