T
T
tutam2018-06-29 08:24:21
Python
tutam, 2018-06-29 08:24:21

How to find out why an application with PyQt5 crashed?

I ran into this problem: if an application using PyQt5 crashes, then nothing is displayed in the shell window about the error that caused it to crash, just a regular Windows window pops up saying that "Python has stopped working." How to get an error message?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2018-06-29
@tutam

winpdb
https://code.google.com/archive/p/winpdb/wikis/Deb...

B
bbkmzzzz, 2018-07-02
@bbkmzzzz

you can try through the traceback module.

from traceback import format_exc
from sys import stderr

## момент на котором предположительно может падать

try:
    ...
except:
    print(format_exc(10), file=stderr) # 10 - глубина стека ошибки

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question