MarcoDuiker / QGIS_BGT_Import

The QGIS BGT Import plugin for importing Dutch BGT data.
Other
4 stars 1 forks source link

Couldn't load plugin 'BGTImport' due to an error when calling its classFactory() method #16

Closed RSOS1 closed 3 years ago

RSOS1 commented 3 years ago

Couldn't load plugin 'BGTImport' due to an error when calling its classFactory() method

ModuleNotFoundError: No module named 'ogr' Traceback (most recent call last): File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/Users/stagiairels1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/BGTImport/init.py", line 34, in classFactory from .bgt_import import BGTImport File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/stagiairels1/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/BGTImport/bgt_import.py", line 50, in import ogr File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'ogr'

MarcoDuiker commented 3 years ago

You are using the latest and greatest QGIS an gdal libs.

import ogr 

was deprecated, but now is wrong. It should be:

from osgeo import ogr

I'll create a fix. Up to that moment you can do a quick fix as suggested here.

RSOS1 commented 3 years ago

Okay, thank you very much. Can you please let me know once the fix is done?

MarcoDuiker commented 3 years ago

I've submitted an update (3.16) to the plugin repo. As soon it is approved you can install the new version.

MarcoDuiker commented 3 years ago

reopend till the update is accepted

MarcoDuiker commented 3 years ago

The new update 3.16 is accepted. The issue should be a thing of the past.