INGV / qquake

A plugin for QGIS 3.x that relies on web services for loading seismological data
https://www.emidius.eu/qquake/
GNU General Public License v3.0
7 stars 3 forks source link

Python errors when loading earthquakes or MDPs using multiple identifiers #1

Closed MarioLocati closed 3 years ago

MarioLocati commented 3 years ago

Entering multiple event identifiers in the tab "Search by Identifiers" for both earthquakes and macroseismic data lead to Python errors when selecting "Basic" output.

Case 1) service type "earthquakes", service "INGV ASMI-CPTI", list using commas 20121025_2305_000,20130621_1033_000,20131229_1708_000,20160824_0136_000 On both Windows and Linux this case works when "Extended" output is selected, whereas lead to Python error when "Basic" output is selected.

Case 1) service type "earthquakes", service "INGV ASMI-CPTI", list using new lines (on Windows 10) 20121025_2305_000 20130621_1033_000 20131229_1708_000 20160824_0136_000 This case lead to a Python error when "Basic" output is selected.

ghtmtt commented 3 years ago

Could you copy/paste the entire stack trace?

MarioLocati commented 3 years ago

Here the stacktrace for Case 1 when basic output is selected

An error has occurred while executing Python code: 

AssertionError 
Traceback (most recent call last):
  File "C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 272, in 
    reply.finished.connect(lambda r=reply: self._reply_finished(r))
  File "C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 344, in _reply_finished
    self.result.add_mdp(reply.readAll())
  File "C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\basic_text_parser.py", line 121, in add_mdp
    assert lines[0][0] == '#'
AssertionError

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.16.0-Hannover Hannover, 43b64b13f3 

Python Path:
C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS3~1.16\apps\Python37
C:\PROGRA~1\QGIS3~1.16\apps\Python37\Scripts
C:\Program Files\QGIS 3.16\bin\python37.zip
C:\PROGRA~1\QGIS3~1.16\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib
C:\Program Files\QGIS 3.16\bin
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\Pythonwin
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python

Here the stacktrace for Case 2 when basic output is selected

An error has occurred while executing Python code: 

AssertionError 
Traceback (most recent call last):
  File "C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 272, in 
    reply.finished.connect(lambda r=reply: self._reply_finished(r))
  File "C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 344, in _reply_finished
    self.result.add_mdp(reply.readAll())
  File "C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\basic_text_parser.py", line 121, in add_mdp
    assert lines[0][0] == '#'
AssertionError

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.16.0-Hannover Hannover, 43b64b13f3 

Python Path:
C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS3~1.16\apps\Python37
C:\PROGRA~1\QGIS3~1.16\apps\Python37\Scripts
C:\Program Files\QGIS 3.16\bin\python37.zip
C:\PROGRA~1\QGIS3~1.16\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib
C:\Program Files\QGIS 3.16\bin
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\Pythonwin
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python