Skip to content

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

@srikanthravipati

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGUI: QtGood 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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy