jorgealmerio / QWater

Hydraulic design and analysis of water supply networks
20 stars 8 forks source link

Cannot load Qwater #12

Closed Bkk1234 closed 4 months ago

Bkk1234 commented 2 years ago

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

TypeError: 'QVariant' object is not subscriptable Traceback (most recent call last): File "C:\PROGRA~1/QGIS 3.22.7/apps/qgis-ltr/./python\qgis\utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "C:\Users/1PBQ643/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QWater__init.py", line 43, in classFactory return QWaterPlugin(iface) File "C:\Users/1PBQ643/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QWater\QWaterPlugin.py", line 88, in init__ locale = QSettings().value('locale/userLocale')[0:2] TypeError: 'QVariant' object is not subscriptable

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.22.7-Białowieża Białowieża, 5a65627a

Python Path: C:/PROGRA~1/QGIS 3.22.7/apps/qgis-ltr/./python C:/Users/1PBQ643/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/1PBQ643/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS 3.22.7/apps/qgis-ltr/./python/plugins C:\Program Files\QGIS 3.22.7\bin\python39.zip C:\PROGRA~1\QGIS 3.22.7\apps\Python39\DLLs C:\PROGRA~1\QGIS 3.22.7\apps\Python39\lib C:\Program Files\QGIS 3.22.7\bin C:\PROGRA~1\QGIS 3.22.7\apps\Python39 C:\PROGRA~1\QGIS 3.22.7\apps\Python39\lib\site-packages C:\PROGRA~1\QGIS 3.22.7\apps\Python39\lib\site-packages\GDAL-3.4.3-py3.9-win-amd64.egg C:\PROGRA~1\QGIS 3.22.7\apps\Python39\lib\site-packages\win32 C:\PROGRA~1\QGIS 3.22.7\apps\Python39\lib\site-packages\win32\lib C:\PROGRA~1\QGIS 3.22.7\apps\Python39\lib\site-packages\Pythonwin C:/Users/1PBQ643/AppData/Roaming/QGIS/QGIS3\profiles\default/python

system/hardware information windows 11 QGIS 3.22.7

Dell OptiPlex 3070 MT cpu i7 8700 vga intel graphics

jorgealmerio commented 2 years ago

I did some tests here without any problems. I am using Qgis 3.24.1 and Windows 11

Please, run the command line in Python Terminal inside Qgis:

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

And Let me know what is happening.

Bkk1234 commented 2 years ago

'th'