I asked this question several days ago on the QGIS developer list but didn't get any love. I'm hoping someone can help me resolve this error.

I have a custom repo and a custom plugin that I'm developing for QGIS. I recently updated the plugin in the repo to a new version and tried to upgrade on my local QGIS install. When I did so, I received the following error:

AttributeError: 'module' object has no attribute 'classFactory'

Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 306, in startPlugin
    plugins[packageName] = package.classFactory(iface)
AttributeError: 'module' object has no attribute 'classFactory'

I've seen this issue before in my plugin (most notably when I try to use the Plugin Reloader tool) but I've never been able to figure it out. Is my plugin missing something in the init.py or in the main plugin class?

The odd thing is that my plugin loads and works just fine except when I update via the repository or when I use the Plugin Reloader tool to reload it.

For reference, my plugin code can be found here:


  • I get this error whenever I try to create a new plugin for QGis. It seems something is broken with the Plugin Builder. – Luís de Sousa Mar 17 '17 at 15:54
  • Got the same error after renaming a QGIS processing plugin I'm writing. My problem was I was having the plugin folder name myplugin (.qgis\python\plugins\myplugin) in lower case letters after a rename from Myplugin. I found no binding in code to case of letter and it seems somewhere hard coded in the work of init.py or class Myplugin. So for now I keep the first letter case large! Refresh plugin now works again. – Jakob Dec 19 '17 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.