Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User

For example - using google search: https://issues.qgis.org/issues/21464

Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 23-03-2023 kl. 15:24 skrev Johannes Kröger (WhereGroup):


Does it really happen all the time for you? It took me quite a while 
to reproduce.


Is there an existing issue already? I'll make one otherwise.

Remember: Bugs cannot be fixed if you keep the knowledge of their 
existence to yourself ;)


Cheers, Hannes

Am 23.03.23 um 15:09 schrieb Bo Victor Thomsen via QGIS-User:


That's an old error. And I really don't know why it hasn't been 
fixed. But to circumvent it:


  * Activate the "Override System Locale" checkbox in Menu:
"Settings" --> "Options" --> top of section "General"
  * Choose the right values in the now visible comboboxes: "User
Interface translation" and "Locale" (Just beneath the checkbox)
  * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about 
every other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen
Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via 
QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin 
builder, is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back 
once. The first plugin I installed crashed with this.


Cheers, Hannes


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user

--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei derwww.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User
I can't honestly answer that question. It's almost automatic (Like a 
Pavlov's dog) for me nowadays to manually set the locale for QGIS on 
every computer I'm using. So I normally don't experience the problem any 
more.


And I don't use the plugin builder anymore to generate the skeleton of a 
new plugin.


Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 23-03-2023 kl. 15:24 skrev Johannes Kröger (WhereGroup):


Does it really happen all the time for you? It took me quite a while 
to reproduce.


Is there an existing issue already? I'll make one otherwise.

Remember: Bugs cannot be fixed if you keep the knowledge of their 
existence to yourself ;)


Cheers, Hannes

Am 23.03.23 um 15:09 schrieb Bo Victor Thomsen via QGIS-User:


That's an old error. And I really don't know why it hasn't been 
fixed. But to circumvent it:


  * Activate the "Override System Locale" checkbox in Menu:
"Settings" --> "Options" --> top of section "General"
  * Choose the right values in the now visible comboboxes: "User
Interface translation" and "Locale" (Just beneath the checkbox)
  * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about 
every other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen
Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via 
QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin 
builder, is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back 
once. The first plugin I installed crashed with this.


Cheers, Hannes


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user

--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei derwww.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread WhereGroup

Created issue: https://github.com/qgis/QGIS/issues/52359

Am 23.03.23 um 15:24 schrieb Johannes Kröger (WhereGroup) via QGIS-User:


Does it really happen all the time for you? It took me quite a while 
to reproduce.


Is there an existing issue already? I'll make one otherwise.

Remember: Bugs cannot be fixed if you keep the knowledge of their 
existence to yourself ;)


Cheers, Hannes

Am 23.03.23 um 15:09 schrieb Bo Victor Thomsen via QGIS-User:


That's an old error. And I really don't know why it hasn't been 
fixed. But to circumvent it:


  * Activate the "Override System Locale" checkbox in Menu:
"Settings" --> "Options" --> top of section "General"
  * Choose the right values in the now visible comboboxes: "User
Interface translation" and "Locale" (Just beneath the checkbox)
  * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about 
every other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen
Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via 
QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin 
builder, is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back 
once. The first plugin I installed crashed with this.


Cheers, Hannes


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user

--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei derwww.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei derwww.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread WhereGroup
Does it really happen all the time for you? It took me quite a while to 
reproduce.


Is there an existing issue already? I'll make one otherwise.

Remember: Bugs cannot be fixed if you keep the knowledge of their 
existence to yourself ;)


Cheers, Hannes

Am 23.03.23 um 15:09 schrieb Bo Victor Thomsen via QGIS-User:


That's an old error. And I really don't know why it hasn't been fixed. 
But to circumvent it:


  * Activate the "Override System Locale" checkbox in Menu: "Settings"
--> "Options" --> top of section "General"
  * Choose the right values in the now visible comboboxes: "User
Interface translation" and "Locale" (Just beneath the checkbox)
  * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about every 
other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen
Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin builder, 
is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back once. 
The first plugin I installed crashed with this.


Cheers, Hannes


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei derwww.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User
Urgh.. There's a sh*tload of existing plugins, based on the plugin 
builder,  having this problem (Including some of my own)



Med venlig hilsen / Best rega ards

Bo Victor Thomsen

Den 23-03-2023 kl. 15:10 skrev Richard Duivenvoorde via QGIS-User:

On 3/23/23 14:00, Bruno Streit wrote:
Thank you, that works perfectly! I've set the userLocal with 
QSettings().setValue('locale/userLocale', 'en_US'). Now the plugins 
work.


But how do I happen to miss this setting (on more than one computer)? 
In Options - General, I override the System Local, use 'American 
English' as User Interface and 'German Switzerland (de_CH)' al locale 
for numbers, date and currency formats. Is it because of this 
settings, that I need to set locale/userLocale via python console? 
Would it be wort filling a bug report for the missing setting?


No, the locale on your computer is not connected to the locale in 
QGIS' QSettings.

There is a QSettings set in every QGIS profile.

If nothing has SET it yet, it is not there. Software should check IF 
it is set, OR give a default.


Regards,

Richard

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Richard Duivenvoorde via QGIS-User

On 3/23/23 14:00, Bruno Streit wrote:

Thank you, that works perfectly! I've set the userLocal with 
QSettings().setValue('locale/userLocale', 'en_US'). Now the plugins work.

But how do I happen to miss this setting (on more than one computer)? In 
Options - General, I override the System Local, use 'American English' as User 
Interface and 'German Switzerland (de_CH)' al locale for numbers, date and 
currency formats. Is it because of this settings, that I need to set 
locale/userLocale via python console? Would it be wort filling a bug report for 
the missing setting?


No, the locale on your computer is not connected to the locale in QGIS' 
QSettings.
There is a QSettings set in every QGIS profile.

If nothing has SET it yet, it is not there. Software should check IF it is set, 
OR give a default.

Regards,

Richard

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User
That's an old error. And I really don't know why it hasn't been fixed. 
But to circumvent it:


 * Activate the "Override System Locale" checkbox in Menu: "Settings"
   --> "Options" --> top of section "General"
 * Choose the right values in the now visible comboboxes: "User
   Interface translation" and "Locale" (Just beneath the checkbox)
 * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about every 
other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin builder, 
is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back once. 
The first plugin I installed crashed with this.


Cheers, Hannes


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread WhereGroup
Took a second look in the lunch break. The issue has been long fixed in 
the repository (August 2019! 
https://github.com/g-sherman/Qgis-Plugin-Builder/issues/116) but an 
updated version of the Plugin Builder was never published so people 
using it will create buggy code with it. It would be great if an update 
could be published.


Cheers, Hannes

Am 23.03.23 um 14:14 schrieb Johannes Kröger (WhereGroup) via QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin builder, 
is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back once. 
The first plugin I installed crashed with this.


Cheers, Hannes


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread WhereGroup



(@gary: I'm not sure but I think this comes from the plugin builder, 
is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using in 
a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back once. 
The first plugin I installed crashed with this.


Cheers, Hannes


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Richard Duivenvoorde via QGIS-User


This means that you do not have a 'locale/userLocale' setting...
Which if the plugin tries to find out your language receiveds 'None'
Which it cannot get the first 2 chars from (using [0:2])

If you open the python console in QGIS, and paste/enter:

QSettings().value('locale/userLocale')
you will probably see nothing or None or Null or so.
With me it shows 'en_US'

To make sure you HAVE such a setting, you could SET it (in python console):
QSettings().setValue('locale/userLocale', 'en_US')
or another preferred language
QSettings().setValue('locale/userLocale', 'nl_NL')
QSettings().setValue('locale/userLocale', 'de_DE')

Then all plugins checking the language in one way or another will at least get 
the right locale.

It would even be better, if the code in the plugin code would be changed from:
QSettings().value('locale/userLocale')
to
QSettings().value('locale/userLocale', 'en_US')
because THEN if a user does not have a locale/userLocale setting it will return 
a default en_US value

(@gary: I'm not sure but I think this comes from the plugin builder, is that 
possible?)

Hope this helps.

Regards,

Richard Duivenvoorde



On 3/23/23 09:23, Bruno Streit via QGIS-User wrote:

Hi List
I keep getting an error when loading or installing plugins as 'Geometry 
Paster', 'Geodata to ENVI-met' and many others. It seems not to be a plugin 
related error, since it happens with many plugins. Or is it?
I'm working with QGIS Firenze ltr and had the problem with Biatowieza before. 
The plugins where updated in this year and are not outdated. In the web I find 
old error reports but the solutions seem not to fit. It seems to have to do 
with a 'locale' Setting:
locale = QSettings().value('locale/userLocale')[0:2]
TypeError: 'NoneType' object is not subscriptable
Any hints, how I could solve this?
Thank you.
Bruno
The whole report:
Couldn't load plugin 'geodata2envimet' due to an error when calling its 
classFactory() method


  TypeError: 'NoneType' object is not subscriptable

Traceback (most recent call last):
   File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 
423, in _startPlugin
     plugins[packageName] = package.classFactory(iface)
   File 
"C:\Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geodata2envimet\__init__.py",
 line 36, in classFactory
     return Geo2ENVImet(iface)
   File 
"C:\Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geodata2envimet\geodata2ENVImet.py",
 line 2553, in __init__
     locale = QSettings().value('locale/userLocale')[0:2]
TypeError: 'NoneType' 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.28.4-Firenze Firenze, fd0fb72ab3


Python Path:

  * C:/PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python
  * C:/Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  * C:/Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
  * C:/PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python/plugins
  * C:\Program Files\QGIS 3.28.4\bin\python39.zip
  * C:\PROGRA~1\QGIS32~1.4\apps\Python39\DLLs
  * C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib
  * C:\Program Files\QGIS 3.28.4\bin
  * C:\Users\icuser\AppData\Roaming\Python\Python39\site-packages
  * C:\PROGRA~1\QGIS32~1.4\apps\Python39
  * C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages
  * C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\win32
  * C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\win32\lib
  * C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\Pythonwin
  * C:/Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  * C:/data/Solothurn_Mikroklima


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bruno Streit via QGIS-User
Hi List
 
I keep getting an error when loading or installing plugins as 'Geometry 
Paster', 'Geodata to ENVI-met' and many others. It seems not to be a plugin 
related error, since it happens with many plugins. Or is it?
 
I'm working with QGIS Firenze ltr and had the problem with Biatowieza before. 
The plugins where updated in this year and are not outdated. In the web I find 
old error reports but the solutions seem not to fit. It seems to have to do 
with a 'locale' Setting:
locale = QSettings().value('locale/userLocale')[0:2]
TypeError: 'NoneType' object is not subscriptable
 
Any hints, how I could solve this?
 
Thank you.
Bruno
 
The whole report:
 
Couldn't load plugin 'geodata2envimet' due to an error when calling its 
classFactory() method
 


TypeError: 'NoneType' object is not subscriptable


Traceback (most recent call last):
  File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 423, 
in _startPlugin
plugins[packageName] = package.classFactory(iface)
  File 
"C:\Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geodata2envimet\__init__.py",
 line 36, in classFactory
return Geo2ENVImet(iface)
  File 
"C:\Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geodata2envimet\geodata2ENVImet.py",
 line 2553, in __init__
locale = QSettings().value('locale/userLocale')[0:2]
TypeError: 'NoneType' 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.28.4-Firenze Firenze, fd0fb72ab3
 


Python Path:


* C:/PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python
* C:/Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python
* C:/Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
* C:/PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python/plugins
* C:\Program Files\QGIS 3.28.4\bin\python39.zip
* C:\PROGRA~1\QGIS32~1.4\apps\Python39\DLLs
* C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib
* C:\Program Files\QGIS 3.28.4\bin
* C:\Users\icuser\AppData\Roaming\Python\Python39\site-packages
* C:\PROGRA~1\QGIS32~1.4\apps\Python39
* C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages
* C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\win32
* C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\win32\lib
* C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\Pythonwin
* C:/Users/icuser/AppData/Roaming/QGIS/QGIS3\profiles\default/python
* C:/data/Solothurn_Mikroklima


 
 ___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user