ValueError if right mouse click in Matplotlib canvas
Issue #179
resolved
At least for Matplot 3.4.3 and 3.4.4, a ValueError occurs if one makes a right-mouse click in the canvas:
File "C:\itom\3rdParty\Python\lib\site-packages\matplotlib\cbook\__init__.py", line 81, in _exception_printer
raise exc
File "C:\itom\3rdParty\Python\lib\site-packages\matplotlib\cbook\__init__.py", line 224, in process
func(*args, **kwargs)
File "C:\itom\3rdParty\Python\lib\site-packages\matplotlib\backend_bases.py", line 2752, in button_press
button_press_handler(event)
File "C:\itom\3rdParty\Python\lib\site-packages\matplotlib\backend_bases.py", line 2618, in button_press_handler
button_name = str(MouseButton(event.button))
File "C:\itom\3rdParty\Python\lib\enum.py", line 339, in __call__
return cls.__new__(cls, value)
File "C:\itom\3rdParty\Python\lib\enum.py", line 662, in __new__
raise ve_exc
ValueError: None is not a valid MouseButton
Comments (2)
-
reporter -
reporter - changed status to resolved
fixes issue 179: ValueError if right click in matplotlib canvas
→ <<cset aa8e584fdc91>>
- Log in to comment
It seems that backend_itom_v3.py, mouseEvent is sometimes called with the argument button=None. Check this.