Skip to content

Problem visualizing Asset Risk Distributions #877

@ptormene

Description

@ptormene

This happened to Catarina trying to open Asset Risk Distributions from a scenario damage in cole using ShakeMap

svir.tasks.extract_npz_task.ExtractFailed: Unable to extract http://oqdb.gem.lan/v1/calc/99959945/extract/damages-rlzs with parameters None (Internal Server Error):
KeyError: "Unable to synchronously open attribute (can't locate attribute: 'json')" in /v1/calc/99959945/extract/damages-rlzs
  File "/opt/openquake/oq-engine/openquake/server/views.py", line 1331, in extract
    obj = _extract(ds, what + query_string)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/openquake/oq-engine/openquake/calculators/extract.py", line 216, in __call__
    return ArrayWrapper.from_(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/openquake/oq-engine/openquake/baselib/hdf5.py", line 646, in from_
    array, attrs = (), dict(obj)
                       ^^^^^^^^^
  File "/opt/openquake/oq-engine/openquake/calculators/extract.py", line 1089, in extract_damages_npz
    damage_dt = build_damage_dt(dstore)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/openquake/oq-engine/openquake/calculators/extract.py", line 1048, in build_damage_dt
    attrs = json.loads(dstore.get_attr('damages-rlzs', 'json'))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/openquake/oq-engine/openquake/commonlib/datastore.py", line 296, in get_attr
    return obj.attrs[name]
           ~~~~~~~~~^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/opt/openquake/venv/lib64/python3.11/site-packages/h5py/_hl/attrs.py", line 56, in __getitem__
    attr = h5a.open(self._id, self._e(name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5a.pyx", line 80, in h5py.h5a.open 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions