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

Unable to use 'Aggregate' button in scenario_damage and scenario_risk calculation #799

Closed alejocaldeGEM closed 1 year ago

alejocaldeGEM commented 1 year ago

For the attached job_damage.ini and job_risk.ini, after OQ successfully finishes the calculation, using the plugin button to show 'Aggregate' damage or losses, total or by tag, as shown in this screenshot, the plugin runs into an error.

screenshot

Full error trace 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 973, 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 986, 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 753, in load_no_map_output
    self.load_avg_losses_rlzs_aggr(
[Cali_Excercise.zip](https://github.com/gem/oq-irmt-qgis/files/9981408/Cali_Excercise.zip)

  File "C:\Users/acalderon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\svir\dialogs\viewer_dock.py", line 869, in load_avg_losses_rlzs_aggr
    self._get_tags(session, hostname, calc_id, self.iface.messageBar(),
  File "C:\Users/acalderon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\svir\dialogs\viewer_dock.py", line 846, in _get_tags
    tag_name, tag_value = tag.split('=')
ValueError: too many values to unpack (expected 2)

The tags have been declared in the file "Exposure_Cal.xml".

Thank you Windows 10 OpenQuake 3.11.4 Plug-in 3.11.4 (same issue in 3.11.6)

alejocaldeGEM commented 1 year ago

Cali_Excercise.zip

ptormene commented 1 year ago

Fixed in f67d9a69