mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-25 11:45:49 +03:00
[GH-ISSUE #484] symbols-images into pushbutton auto-py-to-exe #380
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shlomiz89 on GitHub (May 16, 2024).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/484
Are you using the "The one-file Resource Wrapper" snippet that I provided? You haven't said anything about it? I believe those files are there but you're not looking for them in the right place. Simply running the exe and the images not appearing in the GUI is not enough proof to tell me they're not there.
What was your thorough testing?
In the help post I extensively link I state:
Lets do some checking where we actually look at the folder:
Step 6 should prove that your images are coming through. Just because we are bundling a different script doesn't mean that this will change which files are output (aside from Python script).
Originally posted by @brentvollebregt in https://github.com/brentvollebregt/auto-py-to-exe/issues/121#issuecomment-687667654
Hi, i have the same problem.
i did the steps you mentioned above, the exe file not showing my images. but the images exist in the directory ("one directory" option)
if i run through Spyder it's work good
the python code written as following:
@github-actions[bot] commented on GitHub (May 16, 2024):
👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.
Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.
@brentvollebregt commented on GitHub (May 16, 2024):
I see you are referencing
"enter.jpg"in your script - since this is a relative reference, it will resolve relatively to the current working directory, which will most likely not be where the file is actually being stored in the bundle output.To fix this, you need to wrap file references with
resource_pathto correctly turn a relative path into an absolute path which will point to the correct file. For example,You can read more about this in the help post under "The one-file Resource Wrapper".
@shlomiz89 commented on GitHub (May 16, 2024):
Thank you very much for fast answer
should i write this code into my code?
i mentioned this in the class before setupUi def
and reference it in
icon.addPixmap(QtGui.QPixmap(resource_path("enter.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
i receive an error - undefined name "resource_path"
@brentvollebregt commented on GitHub (May 16, 2024):
Yes, you need to add that function yourself. Nothing provides it for you and this tool doesn't add anything to your application.
@shlomiz89 commented on GitHub (May 16, 2024):
you the besttttt!!!!!!!
thank you <3