schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.2k stars 281 forks source link

Cannot quit PyMol on MacOS #341

Closed ErikPoppleton closed 8 months ago

ErikPoppleton commented 8 months ago

On the latest version of PyMol I can no longer quit the application with the system quit function (python > Quit PyMOL // cmd+Q). Closing with ctrl+C from the command line or the buttons in the corner of the window still works.

It returns the following error:

  File "/Users/erikpoppleton/.local/lib/python3.11/site-packages/pmg_qt/pymol_qt_gui.py", line 870, in confirm_quit
    QtWidgets.qApp.quit()
    ^^^^^^^^^^^^^^
AttributeError: module 'PySide2.QtWidgets' has no attribute 'qApp'

My PySide2 version is 5.15.8

I see the same error in this issue from another repo, which suggests that this is caused by a change in PySide2. There might need to be an update to the quit function to take into account this change.