Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python error #85

Closed
joonaris opened this issue Nov 1, 2023 · 4 comments · Fixed by #86
Closed

Python error #85

joonaris opened this issue Nov 1, 2023 · 4 comments · Fixed by #86
Assignees
Labels
bug Something isn't working

Comments

@joonaris
Copy link

joonaris commented Nov 1, 2023

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
Copy link
Collaborator

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 ismailsunni self-assigned this Nov 1, 2023
@ismailsunni ismailsunni added the bug Something isn't working label Nov 1, 2023
ismailsunni added a commit that referenced this issue Nov 1, 2023
ismailsunni added a commit that referenced this issue Nov 1, 2023
@ismailsunni
Copy link
Collaborator

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
Copy link
Collaborator

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

@joonaris
Copy link
Author

joonaris commented Nov 1, 2023

@ismailsunni Thanks! Now it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants