Unable to export "bcr_distribution" outputs

Bug #1181182 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
Critical
matley

Bug Description

When running the new BCR risk demo (see bug # 1180698), I get the following when I try to run the calculation with `--exports=xml`, or if I try to export it with `--export-risk`.

[2013-05-17 11:13:37,618 risk #2 1.0.0.127.in-addr.arpa CRITICAL MainProcess/71738 root] Calculation failed with exception: 'Error getting hazard metadata: Unexpected output_type "bcr_distribution"'
Traceback (most recent call last):
  File "bin/openquake", line 648, in <module>
    main()
  File "bin/openquake", line 632, in main
    hazard_calculation_id=args.hazard_calculation_id)
  File "bin/openquake", line 494, in run_risk
    job, log_level, log_file, exports, 'risk')
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/engine.py", line 351, in run_calc
    _do_run_calc(job, exports, calc, job_type)
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/engine.py", line 437, in _do_run_calc
    calc.export(exports=exports)
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/calculators/risk/base.py", line 232, in export
    for output in export.core.get_outputs(self.job.id)], [])
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/export/risk.py", line 53, in export
    return [fn(output, os.path.expanduser(target_dir))]
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/export/core.py", line 49, in wrapped
    return fn(output, target_dir)
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/export/risk.py", line 185, in export_bcr_distribution_xml
    args = _export_common(output, output.bcr_distribution.loss_type)
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/export/risk.py", line 61, in _export_common
    metadata = output.hazard_metadata
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/db/models.py", line 1379, in hazard_metadata
    ' "%s"' % self.output_type
RuntimeError: Error getting hazard metadata: Unexpected output_type "bcr_distribution"
[2013-05-17 11:13:38,624 risk #2 - ERROR MainProcess/71739 supervisor] job process 71738 crashed or terminated
Calculation 2 failed

Changed in oq-engine:
milestone: none → 1.0.0
importance: Undecided → Critical
Revision history for this message
matley (matley) wrote :
Changed in oq-engine:
assignee: nobody → matley (matley)
status: New → In Progress
matley (matley)
Changed in oq-engine:
status: In Progress → Fix Committed
Changed in oq-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.