mauroalberti / VectorFieldCalc

QGIS plugin for calculating vector field components
GNU General Public License v3.0
2 stars 1 forks source link

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

Open cmegarcia opened 2 years ago

cmegarcia commented 2 years ago

Hi, I'm having a little not so little issue. I would like to use the Vector menu of QGIS but there are none of the "by default" plugin that work. I get this message error every time I want to use it. Additionally, there is the data management tools that I would like to use that does not show up. I tried reinstalling the plugins but nothing changed, even if the command say it is successfully installed. I would greatly appreciate any input on this issue :) All the best

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

ModuleNotFoundError: No module named 'gdal' Traceback (most recent call last): File "C:\PROGRA1/QGIS311.12/apps/qgis-ltr/./python\qgis\utils.py", line 334, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:\Users/-/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\VectorFieldCalc_init.py", line 29, in classFactory from .vfc_main import VectorFieldCal File "C:\PROGRA1/QGIS311.12/apps/qgis-ltr/./python\qgis\utils.py", line 793, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users/-/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\VectorFieldCalc\vfc_main.py", line 17, in from .main_dialog import MainDialog, HelpDialog File "C:\PROGRA1/QGIS311.12/apps/qgis-ltr/./python\qgis\utils.py", line 793, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users/-AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\VectorFieldCalc\main_dialog.py", line 17, in from .qgis_utils.qgs import File "C:\PROGRA1/QGIS311.12/apps/qgis-ltr/./python\qgis\utils.py", line 793, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users/-/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\VectorFieldCalc\qgis_utils\qgs.py", line 16, in from ..pygsf.libs_utils.gdal.gdal import File "C:\PROGRA1/QGIS311.12/apps/qgis-ltr/./python\qgis\utils.py", line 793, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users/-/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\VectorFieldCalc\pygsf\libs_utils\gdal\gdal.py", line 12, in import gdal File "C:\PROGRA1/QGIS311.12/apps/qgis-ltr/./python\qgis\utils.py", line 793, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'gdal'

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS version: 3.16.12-Hannover Hannover, be6cb03

Python Path: C:/PROGRA1/QGIS311.12/apps/qgis-ltr/./python C:/Users/-/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/-/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA1/QGIS311.12/apps/qgis-ltr/./python/plugins C:\PROGRA1\QGIS311.12\bin\python39.zip C:\PROGRA1\QGIS311.12\apps\Python39\DLLs C:\PROGRA1\QGIS311.12\apps\Python39\lib C:\PROGRA1\QGIS311.12\bin C:\PROGRA1\QGIS311.12\apps\Python39 C:\PROGRA1\QGIS311.12\apps\Python39\lib\site-packages C:\PROGRA1\QGIS311.12\apps\Python39\lib\site-packages\win32 C:\PROGRA1\QGIS311.12\apps\Python39\lib\site-packages\win32\lib C:\PROGRA1\QGIS311.12\apps\Python39\lib\site-packages\Pythonwin C:/Users/-/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users-\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\vector_tiles_reader\ext-libs C:/Users/-/Desktop/3_PhD/31_PhD/313_Kersa/5_QGIS-project

Capture Capture2
mauroalberti commented 2 years ago

Should simply be the gdal import style from osgeo to be fixed. Corrected code, tag 1.5.4, and submitted to the QGIS plugin repository for acceptance. Thanks for feedback.

Addedum: I forgot to add that the official and updated repository is now in gitlab. You find the tag 1.5.4 at: https://gitlab.com/mauroalberti/VectorFieldCalc/-/tags/v1.5.4