-
Hi there ! I finish a work in .py, working fine., I wanna do a .exe with him, with your app, I see that I had to update your app, then I do It. But I have this error:
He seem to dislike import my .png image.
Thanks for help ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Add data seems to not working correctly, or I'm bad.... The .exe works only If I put my images (PNG) in the same directory. They arent add on the .exe file |
Beta Was this translation helpful? Give feedback.
-
I resolve my problem like this:
Then I rename in my script all my image: open('folder/my-file.png') ------> open(resource_path('folder/my-file.png')) In my exemple: Then I add the "folder" contain all my images in "auto-py-to-exe" "additional files" part. |
Beta Was this translation helpful? Give feedback.
I resolve my problem like this:
I add this code:
Then I rename in my script all my image:
open('folder/my-file.png') ------> open(resource_path('folder/my-file.png'))
In my exemple:
image1 = customtkinter.CTkImage(Image.open(resource_path("rs/facebook.png")).resize((50, 50)), size=(50, 50))
Then I add the "folder" contain all my im…