hdus / SRTM-Downloader

GNU General Public License v3.0
28 stars 5 forks source link

list.remove(x): x not in list #27

Open enarroied opened 11 months ago

enarroied commented 11 months ago

Hi,

The plugin does not ask me for authentification, it "downloads" some folders but they are empty, and there is a traceback generated by python.

I can't currently use it.

  |----------------------------------------------|

This is the complete traceback: An error has occurred while executing Python code:

ValueError: list.remove(x): x not in list Traceback (most recent call last): File "C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SRTM-Downloader\download.py", line 119, in reply_finished self.reply_list.remove(reply) ValueError: list.remove(x): x not in list

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS version: 3.26.1-Buenos Aires Buenos Aires, b609df9ed4d

Python Path: C:/OSGeo4W/apps/qgis/./python C:/Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/OSGeo4W/apps/qgis/./python/plugins C:\OSGeo4W\bin\python39.zip C:\OSGeo4W\apps\Python39\DLLs C:\OSGeo4W\apps\Python39\lib C:\OSGeo4W\bin C:\Users\PC\AppData\Roaming\Python\Python39\site-packages C:\OSGeo4W\apps\Python39 C:\OSGeo4W\apps\Python39 C:\OSGeo4W\apps\Python39\lib\site-packages C:\OSGeo4W\apps\Python39\lib\site-packages C:\OSGeo4W\apps\Python39\lib\site-packages\win32 C:\OSGeo4W\apps\Python39\lib\site-packages\win32\lib C:\OSGeo4W\apps\Python39\lib\site-packages\Pythonwin C:/Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python

Input-BDF commented 11 months ago

You can fix this by performing a short check if element exists in list. edit download.py (where it is you see in your error message) as follow on Line 98 an 119

            if reply in self.reply_list:
                self.reply_list.remove(reply)