Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PyQt issue after deployment 2020-2 #45

Open
jklynch opened this issue Aug 25, 2020 · 3 comments
Open

PyQt issue after deployment 2020-2 #45

jklynch opened this issue Aug 25, 2020 · 3 comments
Labels
deploy-2020-2.0 Deployment 2020-2.0

Comments

@jklynch
Copy link
Contributor

jklynch commented Aug 25, 2020

This problem arose at the deployment 2020-2 visit in the GUI program /home/vescovo/arpes_viewer/main.py

Qt.ControlModifier should be used instead of Qt.KeyboardModifier.ControlModifier.

/opt/conda_envs/collection-2020-2.0rc7-1) xf21id1@xf21id1-ws1:~/.ipython/profile_collection/startup$ python /home/vescovo/arpes_viewer/main.py
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: nouveau
QXcbConnection: XCB error: 3 (BadWindow), sequence: 1133, resource id: 31783985, major code: 40 (TranslateCoords), minor code: 0
Traceback (most recent call last):
  File "/home/vescovo/arpes_viewer/main_window.py", line 1267, in onMouseMoved
    if modifier == Qt.KeyboardModifier.ControlModifier:
AttributeError: type object 'KeyboardModifier' has no attribute 'ControlModifier'
Aborted
@jklynch jklynch added the deploy-2020-2.0 Deployment 2020-2.0 label Aug 25, 2020
@mrakitin
Copy link
Member

Versions:

# Does not work in this env:
(/opt/conda_envs/collection-2020-2.0rc7-1) root@xf21id1-ws1:~# conda list | grep -i qt
pyqt                      5.9.2            py37h05f1152_2    defaults
pyqtgraph                 0.10.0                   pypi_0    pypi
qt                        5.9.7                h5867ecd_1    defaults
qt5reactor                0.6.1                      py_0    https://conda.anaconda.org/nsls2forge
qtconsole                 4.7.5                      py_0    defaults
qtpy                      1.9.0                      py_0    defaults
sphinxcontrib-qthelp      1.0.3                      py_0    defaults
(/opt/conda_envs/collection-2020-2.0rc7-1) root@xf21id1-ws1:~# pip list | grep -i qt
pyqtgraph                     0.10.0
qt5reactor                    0.6.1
qtconsole                     4.7.5
QtPy                          1.9.0
sphinxcontrib-qthelp          1.0.3
(/opt/conda_envs/collection-2020-2.0rc7-1) root@xf21id1-ws1:~# conda deactivate

# Works in this env:
root@xf21id1-ws1:~# conda activate collection-2019-2.0-esm
(/opt/conda_envs/collection-2019-2.0-esm) root@xf21id1-ws1:~# conda list | grep -i qt
pyqt                      5.9.2            py36h22d08a2_1    http://alexandria/conda/defaults
pyqtgraph                 0.10.0                   pypi_0    pypi
qt                        5.9.6                h8703b6f_2    http://alexandria/conda/defaults
qtconsole                 4.4.2                    py36_0    http://alexandria/conda/defaults
qtpy                      1.5.2                    py36_0    http://alexandria/conda/defaults
(/opt/conda_envs/collection-2019-2.0-esm) root@xf21id1-ws1:~# pip list | grep -i qt
pyqtgraph           0.10.0
qtconsole           4.4.2
QtPy                1.5.2

@cryos
Copy link

cryos commented Aug 25, 2020

That is odd, the PyQt layer didn't change version, and Qt was only a bug fix release. The qtpy layer moved up quite a few versions - are they going through that? Never mind, I was to log in and look at the file and don't see qtpy use. Odd.

It only seems to appear in main_window.py and it looks like Qt.ControlModifier has always been the documented way of accessing the modifier key. It would be good to get it in version control at some point and make minor changes like this.

@mrakitin
Copy link
Member

cc @bsobhani, we observed this issue with the new collection-2020-2.0rc7-1 conda env.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
deploy-2020-2.0 Deployment 2020-2.0
Projects
None yet
Development

No branches or pull requests

3 participants