Example `main.py` run: `AttributeError: module 'PyQtAds' has no attribute 'CDockManager'`
System:
- Python 3.12.2 (PyQt5, PyQtAds)
- Windows 8.1
$ py main.py
Traceback (most recent call last):
File "...\QtADS\examples\centralwidget\main.py", line 104, in <module>
w = MainWindow()
^^^^^^^^^^^^
File "...\QtADS\examples\centralwidget\main.py", line 23, in __init__
QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.OpaqueSplitterResize, True)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'PyQtAds' has no attribute 'CDockManager'
I've checked the site-packages and didn't found any py modules. But instead have found sip modules.
Do I need to somehow compile sip modules? There is no instructions about it in the readme.
@andry81 The PyQtAds package is a third party contribution and I cannot help you in this case. Maybe you can contact the authors of the contribution to get some help?
@andry81 The PyQtAds package is a third party contribution and I cannot help you in this case. Maybe you can contact the authors of the contribution to get some help?
You have main.py in the examples. The PyQtAds is installed. I have tried to just run the python entry point. And it does not work from the box. Then why to hold it anyway? May be add details with what version of PyQt a user have to run?
My modules list, just in case:
packaging 24.2
pip 25.0.1
prompt_toolkit 3.0.47
PyQt5 5.15.11
PyQt5-Qt5 5.15.2
PyQt5_sip 12.17.0
PyQtAds 3.8.1
setuptools 78.1.0
sip 6.10.0
wheel 0.42.0
What do you mean with: "Then why to hold it anyway?"
What do you mean with: "Then why to hold it anyway?"
It just couldn't run from the box.
Yes, but if you fix it then maybe it will run and other users are happy if you contribute your fix.
Yes, but if you fix it then maybe it will run and other users are happy if you contribute your fix.
And how it works before?
You just need to change the import import PyQtAds as QtAds -> from PyQtAds import ads as QtAds.
Python 3.13.3 (main, Apr 21 2025, 15:30:38) [Clang 20.1.3 ] 64 bit (AMD64) with MSC v.1939 CRT] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5.QtCore
>>> import PyQtAds
>>> dir(PyQtAds)
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'ads']
>>> from PyQtAds import ads
>>> dir(ads)
['AllDockAreas', 'BitwiseAnd', 'BitwiseOr', 'BottomDockWidgetArea', 'CDockAreaTabBar', 'CDockAreaTitleBar', 'CDockAreaWidget', 'CDockComponentsFactory', 'CDockContainerWidget', 'CDockFocusController', 'CDockManager', 'CDockOverlay', 'CDockOverlayCross', 'CDockSplitter', 'CDockWidget', 'CDockWidgetTab', 'CDockingStateReader', 'CElidingLabel', 'CFloatingDockContainer', 'CFloatingDragPreview', 'CIconProvider', 'CSpacerWidget', 'CTitleBarButton', 'CenterDockWidgetArea', 'DockAreaCloseIcon', 'DockAreaMenuIcon', 'DockAreaUndockIcon',
'DockWidgetArea', 'DockWidgetAreas', 'DraggingFloatingWidget', 'DraggingInactive', 'DraggingMousePressed', 'DraggingTab', 'IFloatingWidget', 'IconCount', 'InvalidDockWidgetArea', 'LeftDockWidgetArea', 'NoDockWidgetArea', 'OuterDockAreas', 'RightDockWidgetArea', 'TabCloseIcon', 'TitleBarButton', 'TitleBarButtonClose', 'TitleBarButtonTabsMenu', 'TitleBarButtonUndock', 'TopDockWidgetArea', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'eBitwiseOperator', 'eDragState', 'eIcon', 'internal']
>>> ads.CDockManager
<class 'PyQtAds.ads.CDockManager'>