-
-
Notifications
You must be signed in to change notification settings - Fork 555
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
pyinstaller After compilation erro #1029
Comments
compile cmd : pyinstaller -F -w main.py |
The same issue has been reported on a project of mine. I believe it is related to this change in PyInstaller 5.7.0 which now handles Replicate by compiling the pywebview hello world example with |
I have implemented a fix based on one of linked discussions in the https://github.com/r0x0r/pywebview/tree/logwriter-bottle branch. Please test. |
|
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.
this branch -w is available I won't use github Do I have to do something? Because I found that I still get the issue of -w error when downloading the latest version using pip Including the pywebview[qt] version -w also has this problem |
When will this branch be released to pip? |
@zd20041 now |
Specification
Description
code
import webview
webview.create_window('Hello world', 'https://pywebview.flowrl.com/')
webview.start()
error
Traceback (most recent call last):
File "test1.py", line 1, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "webview_init.py", line 22, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "webview\http.py", line 1, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "bottle.py", line 73, in
AttributeError: 'NoneType' object has no attribute 'write'
The text was updated successfully, but these errors were encountered: