AttributeError: module 'PyQt6.QtQml' has no attribute 'QQmlExtensionPlugin'

Kyle Altendorf sda at
Wed May 12 21:29:45 BST 2021


I'm working on adding Qt6 support to the pyqt-tools family of packages 
and am running into issues with QML plugins.  I get an error that seems, 
so far, to be coming not from my code.

   AttributeError: module 'PyQt6.QtQml' has no attribute 

Searching the PyQt6 6.1.0 source for QQmlExtensionPlugin I get the 
following hits.

PyQt6.QtQml import qmlRegisterType, QQmlExtensionPlugin
*parent) : QQmlExtensionPlugin(parent),
   PyQt6-6.1.0/qmlscene/pluginloader.cpp:    // Get QQmlExtensionPlugin.  
We do this after the import of the plugin to
   PyQt6-6.1.0/qmlscene/pluginloader.cpp:    // QQmlExtensionPlugin.
   PyQt6-6.1.0/qmlscene/pluginloader.cpp:                "%s does not 
contain an implementation of QQmlExtensionPlugin",
   PyQt6-6.1.0/qmlscene/pluginloader.h:#include <QQmlExtensionPlugin>
   PyQt6-6.1.0/qmlscene/pluginloader.h:class PyQt6QmlPlugin : public 
   PyQt6-6.1.0/ChangeLog:  Removed the internal QQmlExtensionPlugin 

I notice the last hit is the changelog entry saying that 
QQmlExtensionPlugin has been removed.  Yet, it is still referenced twice 
in `pluginloader.cpp`.

Is this a sufficient report or do I need to make up a minimal 
reproduction?  The apparent conflict between the source and the 
changelog seemed like it may be sufficient.  Maybe at least to lead to 
an explanation or resource I should read.

Thanks as always.


More information about the PyQt mailing list