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 pywebview with PyInstaller or pythonw (caused by bottle.py) #1048

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

simonrob
Copy link
Contributor

Bottle.py versions prior to 0.12.23 (the latest on PyPi as of Feb 2023) require stdout and stderr to exist when that package is imported, which is not the case on Windows when using pythonw.exe or PyInstaller >= 5.8.0.

This change is similar to the recently-merged PR #1038 that fixed #1029, but the fix in that PR only works if using bottle.py 0.13-dev, which is unlikely in most cases given that this version is not on PyPi (note that the fix it contains was committed over two years ago in January 2021).

This change uses a TemporaryFile instead of DummyLogWriter to resolve the issue. Fixes #1044.

Bottle.py versions prior to 0.12.23 (the latest on PyPi as of Feb 2023) require stdout and stderr to exist when that package is imported, which is not the case on Windows when using pythonw.exe or PyInstaller >= 5.8.0.
This is similar to the recently-merged PR r0x0r#1038 that fixed r0x0r#1029, but this fix only works if using bottle.py 0.13-dev, which is unlikely in most cases given that this version is not on PyPi (note that the fix it contains was committed over two years ago in January 2021).
This change uses a `TemporaryFile` instead of `DummyLogWriter` to resolve the issue.
Fixes r0x0r#1044.
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.

Unable to run with pythonw or PyInstaller pyinstaller After compilation erro
2 participants