piMoll / swissgeodownloader

QGIS Plugin for downloading swiss geodata
https://pimoll.github.io/swissgeodownloader/
GNU General Public License v2.0
9 stars 2 forks source link

"Refresh Dataset list" does not work #3

Closed sbaeji closed 2 years ago

sbaeji commented 2 years ago

Hello Currently we can't use the Swiss Geo Downloader because the "Refresh dataset list" tool does not work. It generates the following error message:

"Python error : Couldn't load plugin 'qgis_resource_sharing' due to an error when calling its classFactory() method See message log (Python Error) for more details."

We work with QGIS Version 3.16.4-Hannover.

Can you help me with this problem? Thanks and best regards

piMoll commented 2 years ago

Hey Thanks for your message. I checked the code and found the issue. Swisstopo has greatly expanded their catalog: a ton of new datasets but also a new dataset property. Since the plugin doesn't know the new property, it fails when reading the dataset properties.

I'll fix this today and make the plugin more robust for future changes. I guess the update will be available in QGIS by tomorrow.

thymaro commented 2 years ago

Can you comment here when it is available for download from the plugin manager? I have the same issue at the moment. Anyway, I don't know if this is still helpful, but here are the message logs from

Messages

2022-02-03T09:39:44     SUCCESS    Swiss Geo Downloader: Layer 'Swisstopo National Map (grey)' added to map
2022-02-03T09:40:25     WARNING    Swiss Geo Downloader: An unknown error occurred

Python Error

2022-02-03T09:40:25     WARNING    Traceback (most recent call last):
              File "C:/Users/thymi/AppData/Roaming/QGIS/QGIS3\profiles\thymaro_std_qgis_profile/python/plugins\swissgeodownloader\api\apiCallerTask.py", line 42, in run
              self.output = self.apiRef.getDatasetList(self)
              File "C:/Users/thymi/AppData/Roaming/QGIS/QGIS3\profiles\thymaro_std_qgis_profile/python/plugins\swissgeodownloader\api\datageoadmin.py", line 89, in getDatasetList
              options[API_OPTION_MAPPER[sumName]] = sumItem
             KeyError: 'geoadmin:lang'

Swiss Geo Downloader

2022-02-03T09:40:25     INFO    Start request https://data.geo.admin.ch/api/stac/v0.9/collections
2022-02-03T09:40:25     CRITICAL    An unknown error occurred
piMoll commented 2 years ago

Thanks for the logs. This has all been fixed. The plugin was uploaded Wednesday night to the QGIS repo and has not been approved yet. But I guess it won't take much longer. Normally they are very quick (1- 2 days).

piMoll commented 2 years ago

The plugin can be updated in QGIS.

sbaeji commented 2 years ago

Thanks for the great support. Everything works again.