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

json.decoder.JSONDecodeError Bug #98

Open Heed725 opened 4 days ago

Heed725 commented 4 days ago

What is the bug or the crash?

An error has occurred while executing Python code:

json.decoder.JSONDecodeError: Expecting value: line 1 column 5 (char 4) Traceback (most recent call last): File "C:\Users/user/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/user/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/user/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/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\gui\resource_browser.py", line 209, in populate_resources response = get_all_resources(force_update=force_update) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_hub_plugin\core\api_client.py", line 18, in get_all_resources return json.load(f) ^^^^^^^^^^^^ File "C:\OSGeo4W\apps\Python312\Lib\json__init.py", line 293, in load return loads(fp.read(), ^^^^^^^^^^^^^^^^ File "C:\OSGeo4W\apps\Python312\Lib\json\init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\OSGeo4W\apps\Python312\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\OSGeo4W\apps\Python312\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 5 (char 4)

Python version: 3.12.6 (main, Sep 7 2024, 18:59:42) [MSC v.1938 64 bit (AMD64)] QGIS version: 3.38.3-Grenoble Grenoble, 37f9e6efee

Python Path: C:\Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OpenTopography-DEM-Downloader C:/OSGeo4W/apps/qgis/./python C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/OSGeo4W/apps/qgis/./python/plugins C:\OSGeo4W\apps\grass\grass84\etc\python C:\Users\user\Documents C:\OSGeo4W\bin\python312.zip C:\OSGeo4W\apps\Python312\DLLs C:\OSGeo4W\apps\Python312\Lib C:\OSGeo4W\bin C:\Users\user\AppData\Roaming\Python\Python312\site-packages C:\OSGeo4W\apps\Python312 C:\OSGeo4W\apps\Python312\Lib\site-packages C:\OSGeo4W\apps\Python312\Lib\site-packages\win32 C:\OSGeo4W\apps\Python312\Lib\site-packages\win32\lib C:\OSGeo4W\apps\Python312\Lib\site-packages\Pythonwin C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users\user\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\HCMGIS/forms

Steps to reproduce the issue

when trying to start the plugin it gives that error

QGIS and Plugin Versions

qgis 3.36

qgis hub plugin 0.1.2

Operating System

Windows 10

Heed725 commented 4 days ago

*Qgis 3.38

Heed725 commented 4 days ago

Ohh and this is on default profile ...... if you change profile the plugin works fine