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

Error during plugin loading: "TypeError: setFixedWidth(self, int): argument 1 has unexpected type 'float'" #229

Closed bakamotokatas closed 2 years ago

bakamotokatas commented 2 years ago

Describe the bug The GIS4WRF plugin is not working I guess since I updated python to 3.10.1.

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

RuntimeError: GIS4WRF: Error installing Python packages Log: Added /home/bakamotokatas/.local/share/gis4wrf/python310/lib/python3.10/site-packages as module search path Traceback (most recent call last): File "/home/bakamotokatas/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 53, in bootstrap_with_ui dialog = WaitDialog(parent, PLUGIN_NAME) File "/home/bakamotokatas/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/helpers.py", line 266, in init self.setFixedWidth(parent.width() * 0.5) TypeError: setFixedWidth(self, int): argument 1 has unexpected type 'float'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/qgis/utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/home/bakamotokatas/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 22, in classFactory bootstrap_with_ui(iface) File "/home/bakamotokatas/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 62, in bootstrap_with_ui raise RuntimeError(PLUGIN_NAME + ': Error installing Python packages\nLog:\n' + log) from e RuntimeError: GIS4WRF: Error installing Python packages Log: Added /home/bakamotokatas/.local/share/gis4wrf/python310/lib/python3.10/site-packages as module search path

To Reproduce When I open QGIS it gives this error.

Expected behaviour When I open QGIS, GIS4WRF should work fine.

Screenshots image

System Information (please complete the following information):

letmaik commented 2 years ago

Thanks for reporting. The error "TypeError: setFixedWidth(self, int): argument 1 has unexpected type 'float'" is related to Qt, which probably was caused by a version update. I've put in a PR https://github.com/GIS4WRF/gis4wrf/pull/230 which should fix it. If you want, you can manually apply this patch to the relevant Python files of gis4wrf, just need to figure out where QGIS stores plugins.

bakamotokatas commented 2 years ago

Hello, thank you for the fix. I applied the patch manually and the plugin is working now.