Solve the PyQt5 program error Process finished with exit code -1073740791 (0xC0000409)

  • Today I am learning to use PyQt5 to operate folders, and write codes following the code pictures in the e-book. Due to the slow typing speed, it took a long time to finish typing, but the running effect is different from the original effect. After clicking the button, the program will be exited directly, and only a prompt will appear in the console:
Process finished with exit code -1073740791 (0xC0000409)

insert image description here

  • After carefully comparing and checking the code, I can't find any mistakes, so how to solve the problem that it is difficult to find mistakes? Hey, of course I searched online.
    Finally found a good way for a big guy:
    open the Run menu in PyCharm, find Edit Configurations to enter, and check Emulate terminal in output console.
    insert image description here
  • Then run the program again, and you can see where the console prompts the code to go wrong:
  • insert image description here
  • It turned out that the NoDotAndDotDot() method was wrongly written as NotDotAndDotDot(), and it ran successfully after being corrected.

The reference article is as follows:
https://blog.csdn.net/qq_28077617/article/details/119386664

Guess you like

Origin blog.csdn.net/ungoing/article/details/127252968