lordmauve / lordmauve/pgzero

`Pyinstaller doesnt work with pygame zero` (please help im in a game jam)

Open
#297 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
611
Forks
211
PR merge metrics
No merged PRs in 30d

Description

please help when i use pyinstaller i convert without any problems but when i run it i get this error
```
Traceback (most recent call last):
File "game.py", line 1, in
import pgzrun
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, 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 638, in get_data
File "PyInstaller\loader\pyimod03_importers.py", line 344, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\jebba\\AppData\\Local\\Temp\\_MEI78562\\pgzero\\data\\icon.png'
[18108] Failed to execute script 'game' due to unhandled exception!
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The traceback points to pgzero/game.py and the missing pgzero/data/icon.png inside PyInstaller's temporary bundle. Start by reproducing the PyInstaller-built game and inspecting how that data path is packaged. Done means the executable starts without the FileNotFoundError; no test or build command is provided in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.