GIS4WRF / gis4wrf

QGIS toolkit 🧰 for pre- and post-processing 🔨, visualizing 🔍, and running simulations 💻 in the Weather Research and Forecasting (WRF) model 🌀
https://gis4wrf.github.io
MIT License
159 stars 36 forks source link

Couldn't load plugin 'gis4wrf' due to an error when calling its initGui() method #223

Closed ZhiCaoIE closed 2 years ago

ZhiCaoIE commented 2 years ago

Couldn't load plugin 'gis4wrf' due to an error when calling its initGui() method

AttributeError: type object 'Qgis' has no attribute 'None' 
Traceback (most recent call last):
  File "C:\PROGRA~1/QGIS31~1.15/apps/qgis-ltr/./python\qgis\utils.py", line 359, in startPlugin
    plugins[packageName].initGui()
  File "C:\Users/caozh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\plugin\plugin.py", line 48, in initGui
    self.init_logging()
  File "C:\Users/caozh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\plugin\plugin.py", line 114, in init_logging
    logging.NOTSET: Qgis.NoLevel if hasattr(Qgis, 'NoLevel') else getattr(Qgis, 'None'),
AttributeError: type object 'Qgis' has no attribute 'None'

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.15-Hannover Hannover, e7fdad64 
OS: Windows 10 Pro

Python Path:
C:/PROGRA~1/QGIS31~1.15/apps/qgis-ltr/./python
C:/Users/caozh/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/caozh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS31~1.15/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.16.15\bin\python39.zip
C:\PROGRA~1\QGIS31~1.15\apps\Python39\DLLs
C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib
C:\Program Files\QGIS 3.16.15\bin
C:\Users\caozh\AppData\Roaming\Python\Python39\site-packages
C:\Users\caozh\AppData\Roaming\Python\Python39\site-packages\win32
C:\Users\caozh\AppData\Roaming\Python\Python39\site-packages\win32\lib
C:\Users\caozh\AppData\Roaming\Python\Python39\site-packages\Pythonwin
C:\PROGRA~1\QGIS31~1.15\apps\Python39
C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\site-packages\GDAL-3.4.0-py3.9-win-amd64.egg
C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS31~1.15\apps\Python39\lib\site-packages\Pythonwin
C:/Users/caozh/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\caozh\AppData\Local\gis4wrf\python39
C:\Users\caozh\AppData\Local\gis4wrf\python39\lib\site-packages
letmaik commented 2 years ago

I can confirm the issue with QGIS 3.16.15. As a work-around, I suggest to upgrade to 3.22 since that version works fine.

EDIT: This is fixed now for QGIS 3.16 with the latest GIS4WRF release 0.14.6.

ZhiCaoIE commented 2 years ago

Thanks for your quick response. Indeed, upgrading QGIS to 3.22 solves the reported issue.