[Bug]: TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier' · Issue #24155 · matplotlib/matplotlib · GitHub
Skip to content

[Bug]: TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier' #24155

Description

@srikanthravipati

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

from matplotlib.backends.backend_qtagg import NavigationToolbar2QT as NavigationToolbar

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGUI: Qt🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions