-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier' #24155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
pyside 6.4.0 went up on pypi about 2 hours ago. I suspect something changed about how the handle enums and we will need to adjust. This is a good first issue because the behavior is "should import" and the changes should be localized to only |
FYI I expect this to break stuff for a lot of folks. It broke a bunch of our CIs in MNE-Python :( |
This is most likely related to the Enum change, see here. |
I resolved the issue by downgrading PySide6 to a version earlier than 6.4.0.👌 |
Can confirm I also see this:
|
@ReubenVandezande please upgrade your Matplotlib to version 3.6.2 or higher. |
Bug summary
Error while importing matplotlib qt backend.
The version details are as below
matplotlib: 3.6.1
pyside: 6.4.0
python: 3.9.9
on a macOS-M1 machine.
Code for reproduction
Actual outcome
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/backends/backend_qtagg.py", line 12, in
from .backend_qt import QtCore, QtGui, _BackendQT, FigureCanvasQT
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/backends/backend_qt.py", line 72, in
_MODIFIER_KEYS = [
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/backends/backend_qt.py", line 73, in
(_to_int(getattr(_enum("QtCore.Qt.KeyboardModifier"), mod)),
TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier'
Expected outcome
No error!
Additional information
No response
Operating system
OS/X
Matplotlib Version
3.6.1
Matplotlib Backend
MacOSX
Python version
3.9.9
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: