When trying to load the extended output (QuakeML 2.0) from a macroseismic service and the magnitude (or epicentre) is missing the plugin throw the following Python error:
KeyError: None Traceback (most recent call last): File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\gui\qquake_dialog.py", line 970, in _fetcher_finished layer = self.fetcher.create_mdp_layer() File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 783, in create_mdp_layer return self.mdpset_to_layer(self.result) File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 678, in mdpset_to_layer for f in parser.create_mdp_features(self.output_fields, self.preferred_mdp_only): File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\quakeml\parser.py", line 387, in create_mdp_features source_obj = self.magnitudes[event.preferredMagnitudeID]
When trying to load the extended output (QuakeML 2.0) from a macroseismic service and the magnitude (or epicentre) is missing the plugin throw the following Python error:
KeyError: None Traceback (most recent call last): File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\gui\qquake_dialog.py", line 970, in _fetcher_finished layer = self.fetcher.create_mdp_layer() File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 783, in create_mdp_layer return self.mdpset_to_layer(self.result) File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 678, in mdpset_to_layer for f in parser.create_mdp_features(self.output_fields, self.preferred_mdp_only): File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\quakeml\parser.py", line 387, in create_mdp_features source_obj = self.magnitudes[event.preferredMagnitudeID]
The code involved is https://github.com/INGV/qquake/blob/master/qquake/quakeml/parser.py#L387
The error can be reproduced using the "INGV ASMI-DBMI" macroseismic service using the folowing Event IDs: