qgis / QGIS-Hub-Plugin

A QGIS plugins to fetch resources from the QGIS Hub
https://qgis.github.io/QGIS-Hub-Plugin/
GNU General Public License v3.0
4 stars 2 forks source link

Python error #85

Closed joonaris closed 12 months ago

joonaris commented 12 months ago

What is the bug or the crash?

Unable to open the tool. Tried with several QGIS versions (3.28., 3.30., 3.32.)

I got the following error message: 2023-11-01T11:06:14 WARNING Traceback (most recent call last): File "C:\Users/joona/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\utilities\common.py", line 33, in download_resource_thumbnail extension = url.split(".")[-1] AttributeError: 'NoneType' object has no attribute 'split'

         During handling of the above exception, another exception occurred:

         Traceback (most recent call last):
          File "C:\Users/joona/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\plugin_main.py", line 174, in _open_resource_browser_dialog
          dialog = ResourceBrowserDialog(
          File "C:\Users/joona/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\gui\resource_browser.py", line 89, in __init__
          self.populate_resources()
          File "C:\Users/joona/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\utilities\qgis_util.py", line 11, in wrapper
          return func(*args, **kwargs)
          File "C:\Users/joona/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\gui\resource_browser.py", line 222, in populate_resources
          item = ResourceItem(resource)
          File "C:\Users/joona/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\gui\resource_item.py", line 34, in __init__
          thumbnail_path = download_resource_thumbnail(self.thumbnail, self.uuid)
          File "C:\Users/joona/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\utilities\common.py", line 34, in download_resource_thumbnail
          except IndexError():
         TypeError: catching classes that do not inherit from BaseException is not allowed

Steps to reproduce the issue

  1. Install the plugin.
  2. Click on the plugin icon.
  3. See error QGIS_Hub_plugin_error

QGIS and Plugin Versions

Tried wtih several QGIS versions. Same problem every time. 3.28. 3.30. 3.34.

Operating System

Windows 10

ismailsunni commented 12 months ago

Hi @joonaris thanks for the bug report, I can reproduce it. Perhaps something changes on the server side. I will take a look at this bug.

ismailsunni commented 12 months ago

Hi @joonaris I have fixed the bug, currently, it's being uploaded to the QGIS Plugin repository. It may take some time to show up on the Plugin Manager. Meanwhile, you can try to install the plugin with the fix from the release page here: https://github.com/qgis/QGIS-Hub-Plugin/releases/tag/0.1.2

ismailsunni commented 12 months ago

Update: it's now available on QGIS Plugin Repository.

joonaris commented 12 months ago

@ismailsunni Thanks! Now it works.