Gooey
Gooey copied to clipboard
No status info is showed anymore after pyinstaller pkg to one exe file... What should I do next?
Gooey: Lastest Version Python: 3.10
The first screenshot is BEFORE pyinstaller, there are much info showed in status windows.
The second screenshot is AFTER pyinstaller, no status anymore..
sometimes, some words jump out:
I have the same issue with Python 3.6 and Gooey 1.2.0-alpha
This seems to be a duplicate of https://github.com/chriskiehl/Gooey/issues/701
Workaround: Add flush=True
to all print statements:
print("foo", flush=True)
Alternatively, modify the print
statement to always flush (careful with this, it's usually a bad idea to modify/overwrite built-ins):
import functools
print = functools.partial(print, flush=True)
print("foo") # this uses flush=True now
Finally I use loguru ... put all printout to debug.log...
Finally I use loguru ... put all printout to debug.log...
The same problem, I finally modified the functions _extract_progress
and _forward_stdout
in processor.py
to change the decoding method to gbk
,it seems to be working normally
When building it with pyinstaller you need to set the option u
for unbuffered. Then flushing on print is not needed.
Example:
pyinstaller --onefile --windowed --python-option u python_script.py
see more details here