Error in Python shell event filter
Reported by: |
goddard@… |
Owned by: |
pett |
Priority:
|
normal
|
Milestone:
|
|
Component:
|
General Controls
|
Version:
|
|
Keywords:
|
|
Cc:
|
|
Blocked By:
|
|
Blocking:
|
|
Notify when closed:
|
|
Platform:
|
all
|
Project:
|
ChimeraX
|
|
|
The following bug report has been submitted:
Platform: Darwin-18.7.0-x86_64-i386-64bit
ChimeraX Version: 0.91 (2019-10-04)
Description
Clicked on Python shell window and got this error.
Log:
UCSF ChimeraX version: 0.91 (2019-10-04)
© 2016-2019 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX
> open /Users/goddard/ucsf/people/mckeithan/ForTom/cells4b.cxs format session
opened ChimeraX session
> toolshed show Shell
> set bgColor black
Traceback (most recent call last):
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
See log for complete Python traceback.
OpenGL version: 4.1 ATI-2.11.20
OpenGL renderer: AMD Radeon Pro 580 OpenGL Engine
OpenGL vendor: ATI Technologies Inc.
Looking the code for qtconsole.eventFilter, this error would seem to be impossible. Early in the routine, 'etype' is assigned as:
etype = event.type()
The 'no "button" attribute' error occurs in this code:
elif etype == QtCore.QEvent.MouseButtonRelease and event.button() == QtCore.Qt.MidButton and ...
So, an event of type MouseButtonRelease doesn't have a .button() attribute?
Weird.