Problems with utils/view_midplane_disk.py
When using utils/view_midplane_disk.py
(for example python <...>/utils/view_midplane_disk.py disk0.h5 -g polar -s log
) I get
../../../fargOCA/utils/view_midplane_disk.py:82: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if 'polar_grid' in obj[path]: fields.append(path)
Traceback (most recent call last):
File "../../../fargOCA/utils/view_midplane_disk.py", line 92, in <module>
paths = extract_field_paths(disk)
File "../../../fargOCA/utils/view_midplane_disk.py", line 83, in extract_field_paths
obj.visit(collect_fields)
File "/mpcdf/soft/SLE_12/packages/x86_64/anaconda/3/2019.03/lib/python3.7/site-packages/h5py/_hl/group.py", line 532, in visit
return h5o.visit(self.id, proxy)
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/h5o.pyx", line 355, in h5py.h5o.visit
File "h5py/defs.pyx", line 1594, in h5py.defs.H5Ovisit_by_name
File "h5py/h5o.pyx", line 302, in h5py.h5o.cb_obj_simple
File "/mpcdf/soft/SLE_12/packages/x86_64/anaconda/3/2019.03/lib/python3.7/site-packages/h5py/_hl/group.py", line 531, in proxy
return func(self._d(name))
File "../../../fargOCA/utils/view_midplane_disk.py", line 82, in collect_fields
if 'polar_grid' in obj[path]: fields.append(path)
File "/mpcdf/soft/SLE_12/packages/x86_64/anaconda/3/2019.03/lib/python3.7/site-packages/h5py/_hl/dataset.py", line 472, in __iter__
raise TypeError("Can't iterate over a scalar dataset")
TypeError: Can't iterate over a scalar dataset
This does not happen on certain disc files but it does happen on others. I'm not sure if there is some "versioning" of the disc files which messes up with this.