Some questions on binary version with "--noconsole" option #7881
-
Hello, I've been using PyInstaller to convert my Python scripts into binaries, particularly with the --noconsole option. While the conversion process is understandably lengthy due to dependencies, my primary concern lies in debugging the resulting binary. When I use the --noconsole option, I'm unable to see errors, which makes it challenging to diagnose issues. Interestingly, certain errors arise only when the console is disabled. When I use the console option, those errors don't manifest. I think I can create a log in binary version. However, is there a recommended way to effectively debug these issues in the binary version without the console? Moreover, each conversion is time-consumed..... Once I check the log and fix the bugs in script, I have to convert it to binary again to test it..... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If the error in If the error is handled but for example prints a warning to stdout/stderr (for example via
Then your code or the 3rd party code you are using is being naive and expects that |
Beta Was this translation helpful? Give feedback.
If the error in
noconsole
executable (assuming we are talking about Windows here) results in an unhandled exception, PyInstaller's bootloader should pop up an error window with information about exception and its traceback.If the error is handled but for example prints a warning to stdout/stderr (for example via
logging
) then you won't see it due to lack of console. So if you want to capture warnings that would otherwise go to stderr, you will need to redirect that to a log file.Then your code or the 3rd party code you are using is being naive and expects …