PANOimagen / batch_hillshader

Plugin to generate a three light exposure hillshade (shaded relief by combining three light exposures)
GNU General Public License v3.0
16 stars 3 forks source link

TypeError: 'QVariant' object is not subscriptable #4

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hej,

I am trying to install plugin into qGIS 3.6.0. on windows 7, but I am receiving this error. Any help?

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

TypeError: 'QVariant' object is not subscriptable Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python\qgis\utils.py", line 335, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/manuel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\batch_hillshader-master__init.py", line 48, in classFactory return batchHillshader(iface) File "C:/Users/manuel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\batch_hillshader-master\batch_hillshader.py", line 68, in init__ locale = QSettings().value('locale/userLocale')[0:2] TypeError: 'QVariant' object is not subscriptable

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.6.0-Noosa Noosa, 58734527ab

Python Path: C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python C:/Users/manuel/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/manuel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python/plugins C:\Program Files\QGIS 3.6\bin\python37.zip C:\PROGRA~1\QGIS3~1.6\apps\Python37\DLLs C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib C:\Program Files\QGIS 3.6\bin C:\PROGRA~1\QGIS3~1.6\apps\Python37 C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\win32 C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\win32\lib C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\Pythonwin C:/Users/manuel/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users\manuel\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins C:\Users\manuel\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins

RobertoPanoi commented 5 years ago

Hi @MarkoMarulic , could you try to launch the follow line code in the QGIS Python console and print the result of locale?

locale = QSettings().value('locale/userLocale')[0:2] print(locale)

There are other QGIS plugins with the same problem, some solve it by deleting the plugin folder and trying to reinstall, I send the link of one of them: https://github.com/ghtmtt/DataPlotly/issues/78

Thanks

ghost commented 5 years ago

Hej Robert,

Looks like problem solved by it self :-) Today I started PC and plug in is working. Looks like restart help.

RobertoPanoi commented 5 years ago

Ok. We will look at what happened so that the error does not repeat itself. Thank you