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

No status info is showed anymore after pyinstaller pkg to one exe file... What should I do next? #878

Open
huyangnl opened this issue May 16, 2023 · 5 comments

Comments

@huyangnl
Copy link

Gooey: Lastest Version
Python: 3.10

The first screenshot is BEFORE pyinstaller, there are much info showed in status windows.

截屏2023-05-16 22 43 38

The second screenshot is AFTER pyinstaller, no status anymore..

截屏2023-05-16 22 43 06

sometimes, some words jump out:

截屏2023-05-16 22 44 45

@m-ad
Copy link

m-ad commented May 24, 2023

I have the same issue with Python 3.6 and Gooey 1.2.0-alpha

@m-ad
Copy link

m-ad commented May 24, 2023

This seems to be a duplicate of #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

@huyangnl
Copy link
Author

Finally I use loguru ... put all printout to debug.log...

@keymou
Copy link

keymou commented Jun 15, 2023

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

@sliverc
Copy link

sliverc commented Jun 20, 2023

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

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

No branches or pull requests

4 participants