lordmauve / pgzero

A zero-boilerplate games programming framework for Python 3, based on Pygame.
https://pygame-zero.readthedocs.io/
GNU Lesser General Public License v3.0
527 stars 191 forks source link

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

Open astrogames06 opened 2 years ago

astrogames06 commented 2 years ago

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 <module>
    import pgzrun
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "pgzrun.py", line 23, in <module>
  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!