Import `QtCore.Qt` failure - `AttributeError: Cannot reassign members.`
See original GitHub issueRunning in a venv;
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
packaging==21.3
pip==22.0.4
pyparsing==3.0.9
PySide6==6.4.0
PySide6-Addons==6.4.0
PySide6-Essentials==6.4.0
QtPy==2.2.1
setuptools==58.1.0
shiboken6==6.4.0
from qtpy.QtCore import Qt
results in;
Traceback (most recent call last):
File "C:\Users\XXXXXXXX\Desktop\okko.py", line 1, in <module>
\ufefffrom qtpy.QtCore import Qt
File "C:\Users\XXXXXXXX\Desktop\okko\.venv\lib\site-packages\qtpy\QtCore.py", line 116, in <module>
Qt.MidButton = Qt.MouseButton.MiddleButton = Qt.MiddleButton
File "shibokensupport/enum_310.py", line 529, in __setattr__
AttributeError: Cannot reassign members.
Qt.MouseButton.MiddleButton exists before the assignment.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to fix attribute Error for module in PyQt5 - Stack Overflow
Try it: import sys from PyQt5 import QtCore, QtGui, QtWidgets # +++ from disptime import Ui_Dialog # * <-> Ui_Dialog #class MyForm(QtGui.
Read more >AttributeError when creating pyqtgraph plots inside the main ...
However, when I try to run this code, it returns the error: QtGui.QApplication.instance().exec_() AttributeError: 'NoneType' object has no ...
Read more >PyQt5 vs PyQt6: What are the differences, and is it time to ...
In PyQt6 all enum members must be named using their fully qualified names. This applies to all enums and flags, including those in...
Read more >Using QGIS plugin default code produces attribute error
Using Windows 10/QGIS 2.18 and QT Designer, I am creating a plugin that will create several random point selections and to place the...
Read more >qtpy/CHANGELOG.md at master · spyder-ide/qtpy - GitHub
... PySide6 6.4.0 support - AttributeError: Cannot reassign members ... Issue 367 - Import behaviour if no Qt bindings are installed (PR 379 ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @owillebo thank you for the feedback! This looks like a duplicate of #373 and it was already fixed with #374
Just in case, we are currently checking what other elements could need an update due to PySide6 6.4.0 release at #375 and #376 . For the moment, to prevent this issue, you will need to downgrade PySide 6 to a 6.3.x version.
Let us know if the info above helps!
Works like a charm!