gem / oq-irmt-qgis

QGIS plugin to drive the OpenQuake Engine, to develop Social Vulnerability and Integrated Risk composite indices, and to predict building recovery times following an earthquake
https://plugins.qgis.org/plugins/svir/
8 stars 3 forks source link

Aggregate Risk Curves unable to present loss exceedance curves #809

Closed alejocaldeGEM closed 1 year ago

alejocaldeGEM commented 1 year ago

Issue

In the attached calculation, if the user pulses the button for Show that corresponds to the Aggregated Risk Curves output, the plug-in fails with the following message:

Traceback (most recent call last): File "C:\Users/acalderon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\svir\dialogs\drive_oq_engine_server_dialog.py", line 974, in self.on_output_action_btn_clicked( File "C:\Users/acalderon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\svir\dialogs\drive_oq_engine_server_dialog.py", line 987, in on_output_action_btn_clicked self.viewer_dock.load_no_map_output( File "C:\Users/acalderon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\svir\dialogs\viewer_dock.py", line 737, in load_no_map_output self.load_agg_curves(calc_id, session, hostname, output_type) File "C:\Users/acalderon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\svir\dialogs\viewer_dock.py", line 921, in load_agg_curves tag_values = self.tags[tag_name]['values'].keys() TypeError: unhashable type: 'list'

OQ version 3.16.0 Plug-in version 3.15.2 QGIS version 3.22

Intended Behavior

Before this button would plot in the OpenQuake Data Viewer the total loss exceedance curve for any risk metric (structural non-structural occupants) in Absolute or Relative terms. If the user set the parameter individual_curves = True in the job.ini, the button would plot the individual curves corresponding to each of the realizations of the hazard logic_tree (see the image provided).

How to replicate the error: error1

Full traceback: trace_back

Intended Behavior: intended_behavior

event_based_risk.zip

ptormene commented 1 year ago

Fixed in https://github.com/gem/oq-irmt-qgis/pull/813

ptormene commented 1 year ago

Requires OQ Engine >= v3.16.2