3

I am currently learning PyQt5 and I have encountered this problem and solved it using the solution explained there, but since then, I am seeing this warning

An exception has occurred, use %tb to see the full traceback.

SystemExit: 0


/home/aditya/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2971: UserWarning: To exit: use 
'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

Now, I don't know if this warning could be harmful or not. But how do I fix this?

Any help is appreciated. Thanks

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
aditya rawat
  • 105
  • 8
  • Does this answer your question? [simple IPython example raises exception on sys.exit()](https://stackoverflow.com/questions/10888045/simple-ipython-example-raises-exception-on-sys-exit) – Prathik Kini Jul 27 '20 at 07:49

1 Answers1

0

you are facing this error because you are using in your code sys.exit() function. it is implemented from pyqt4 to pyqt5 which is latest one! i suggest you to do not use sys.exit instead of this you can use app = QApplication(sys.argv) app.exec_() app.quit() for terminating your window.

shailu
  • 190
  • 1
  • 10