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

Fix frozen programs crash due to missing json import #98

Closed
wants to merge 1 commit into from
Closed

Fix frozen programs crash due to missing json import #98

wants to merge 1 commit into from

Conversation

MyreMylar
Copy link
Contributor

If you try to freeze a pygame_sdl2 program right now using PyInstaller you get a crash on windows (and presumably other platforms) with a json import error. Adding an 'import json' fixes this crash and lets pygame_sdl2 support PyInstaller.

While I was in here I added two lines of optional imports for the render module in the same pattern as the other optional import modules - since they seemed to be missing. These are not essential to fix the crash and can be removed if they aren't wanted for some reason.

…r) would hang with a json import error.

I also added similar import statements for the render module for completeness, since they seemed to be missing.
@MyreMylar
Copy link
Contributor Author

This is for issue #94.

@Remusforte
Copy link

I added these 4 lines to my local pygame_sdl2 code and can confirm that it does indeed resolve the PyInstaller crash (related to missing JSON import) in Windows! Good job! This should be brought into the main code set, unless it's creating some conflict somewhere else.

@renpytom
Copy link
Member

Closing this, as building pygame_sdl2 outside of Ren'Py is no longer supported.

@renpytom renpytom closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants