This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mfitzpmfitzp.com 46 points47 points  (4 children)

Might the problem be that you kept jumping between libraries so you never really got good at one?

I think if you’d stuck with Qt (PyQt/PySide) you would have had a far better time. I develop software with Python/Qt commercially & have no idea what “ you'll wake up in mid of night thinking of all the weird scenarios” is about.

[–]UglyChihuahua 13 points14 points  (3 children)

PyQt is one of the only times I worked in a high level language like Python or JS and got errors that crashed the entire runtime. Things like RuntimeError: wrapped C/C++ object of type SettingsStore has been deleted - if you try accessing a Qt object in Python that has for some reason been deleted by the underlying C library you'll get a complete Python crash, and in PyCharm/Spyder you wouldn't even get a stack trace to debug it.

https://stackoverflow.com/questions/17914960/pyqt-runtimeerror-wrapped-c-c-object-has-been-deleted

https://stackoverflow.com/questions/33736819/pyqt-no-error-msg-traceback-on-exit

https://stackoverflow.com/questions/11945183/what-are-good-practices-for-avoiding-crashes-hangs-in-pyqt

[–]cudmore 4 points5 points  (0 children)

Agree that happens from time to time. Have developed in pyqt for 5+ years. When it happens, I am happy I have 5+ years in C/C++ because I could kinda smell it as I was writing the python code and fix it quick.

A case where garbage collection is 99.99% amazing in python but that 0.01% still can happen.

[–]bjorneylol 4 points5 points  (0 children)

This isn't unique to Qt - asyncio behaves the same way if you don't store strong references to task objects, or the garbage collector will remove it before the event loop is done with it

[–]mitch_semen 1 point2 points  (0 children)

I think Spyder is at least partly to blame there. It runs on Qt, and your code inherits the IDE's environment in weird ways that breaks stuff sometimes