[GH-ISSUE #449] pyinstaller converted .exe file not saving the images as required . #359

Closed
opened 2026-02-26 12:21:20 +03:00 by kerem · 4 comments
Owner

Originally created by @Akashmsagar0707 on GitHub (Dec 25, 2023).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/449

Originally assigned to: @Akashmsagar0707 on GitHub.

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)
Originally created by @Akashmsagar0707 on GitHub (Dec 25, 2023). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/449 Originally assigned to: @Akashmsagar0707 on GitHub. 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)
kerem 2026-02-26 12:21:20 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Dec 25, 2023):

👋 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.

<!-- gh-comment-id:1868810812 --> @github-actions[bot] commented on GitHub (Dec 25, 2023): 👋 Hi, just a reminder that if you haven't read [the help post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/) yet, give it a read to see if your issue is covered in it and make sure to follow [the debugging section](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging). 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](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/), [video](https://youtu.be/OZSZHmWSOeM) or create a [new discussion](https://github.com/brentvollebregt/auto-py-to-exe/discussions).
Author
Owner

@brentvollebregt commented on GitHub (Dec 25, 2023):

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?
<!-- gh-comment-id:1868909096 --> @brentvollebregt commented on GitHub (Dec 25, 2023): 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?
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2024):

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.

<!-- gh-comment-id:1939957741 --> @github-actions[bot] commented on GitHub (Feb 13, 2024): 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.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 18, 2024):

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

<!-- gh-comment-id:1950675855 --> @github-actions[bot] commented on GitHub (Feb 18, 2024): Closing issue due to no activity in more than 60 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#359
No description provided.