You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exceptions that are detected once mainloop() is running are logged and generate a dialog asking the user to send the log file. But (otherwise uncaught) exceptions that occur before mainloop() is running are not logged and are impossible to debug when the app is run with the standard pyinstaller executables. This was the case when a user encountered the problem reported in Issue #66. Fortunately, he was willing to run a special debug version of the app that started from the console, which allowed the stack trace to be seen.
What is needed is a catch-all exception handler that logs the stack trace and generates a dialog for otherwise uncaught exceptions that occur before mainloop() is running.
The text was updated successfully, but these errors were encountered:
Since the exception could be detected even before logging is set up (and is by definition before the GUI is running), the stack trace cannot be "logged" and a dialog cannot be displayed. Instead, the stack trace should be written to a temporary file and the file should be opened with the system viewer.
A try/except is now added in main() around the creation of the GraphicalUserInterface object and the call to its run() method. A new handle_early_exception() global function is called in the "except" branch. This function creates a temporary file and writes the error message and stack trace to that file. It then opens that file using the system viewer.
Exceptions that are detected once mainloop() is running are logged and generate a dialog asking the user to send the log file. But (otherwise uncaught) exceptions that occur before mainloop() is running are not logged and are impossible to debug when the app is run with the standard pyinstaller executables. This was the case when a user encountered the problem reported in Issue #66. Fortunately, he was willing to run a special debug version of the app that started from the console, which allowed the stack trace to be seen.
What is needed is a catch-all exception handler that logs the stack trace and generates a dialog for otherwise uncaught exceptions that occur before mainloop() is running.
The text was updated successfully, but these errors were encountered: