Auto Py to Exe error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 611
- Forks
- 211
- PR merge metrics
- No merged PRs in 30d
Description
Hi
When converting my pygame zero game to a EXE file for windows using Auto Py to Exe https://pypi.org/project/auto-py-to-exe/
I get the following error trying to run my EXE (I don't have this error when converting a pygame game (not using pygame zero) to EXE using exactly the same way):
Traceback (most recent call last):
File "tigerheli.py", line 2, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "pgzrun.py", line 23, in
File "pgzero\runner.py", line 106, in prepare_mod
File "pgzero\game.py", line 92, in show_default_icon
File "pkgutil.py", line 639, in get_data
File "PyInstaller\loader\pyimod03_importers.py", line 344, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\GEBRUI~1\\AppData\\Local\\Temp\\_MEI183602\\pgzero\\data\\icon.png'

What to do to solve this?
I don't know what the file icon.png is and I also don't use this in my code.
Attached is the source of my game and all needed images/sounds
[tigerheli.zip](https://github.com/lordmauve/pgzero/files/8100857/tigerheli.zip)
thank you very much
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Windows executable failure with the attached tigerheli.zip using Auto Py to Exe, then inspect pgzero/game.py and the traceback’s reference to pgzero/data/icon.png. Done means the packaged executable launches without the FileNotFoundError while preserving the default icon behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100