Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyinstaller converted .exe file not saving the images as required . #449

Closed
Akashmsagar0707 opened this issue Dec 25, 2023 · 4 comments
Closed
Assignees
Labels

Comments

@Akashmsagar0707
Copy link

I am stuck with an unusual problem. I have a GUI code written in Python PyQt5. It has images, put inside an image folder and many python files. This GUI is working fine in Pycharm. I am able to generate a standalone executable file for this project using Pyinstaller. When i run the exe , no images are visible in GUI . i have really tried hard and searched a lot of internet for the same , but still i am not getting this concept of getting the images . please help me for this .

img = QPixmap(":/results_drawing.jpeg")
img = img.scaledToWidth(380, Qt.FastTransformation)
resultsStaticImg = QLabel("")
resultsStaticImg.setPixmap(img)
resultsStaticImg.setStyleSheet("border-style: outset;text-align:center;border-width: 4px;border-radius: 10px; border-color: #00bfff;")
window.logoLayout.addWidget(resultsStaticImg, alignment=Qt.AlignCenter)
@Akashmsagar0707 Akashmsagar0707 added the bug Something isn't working label Dec 25, 2023
Copy link

👋 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
Copy link
Owner

Some questions (all separate):

  1. Have you included this image file as an additional file?
  2. While using a one-directory build, can you see the file that you are referencing in QPixmap?
  3. Have you tried printing out the exact path that QPixmap will look for that file for at runtime and checked that the file exists?

@brentvollebregt brentvollebregt removed the bug Something isn't working label Jan 13, 2024
Copy link

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

@github-actions github-actions bot added the Stale label Feb 13, 2024
Copy link

Closing issue due to no activity in more than 60 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants