prjemian / punx

Python Utilities for NeXus HDF5 files
https://prjemian.github.io/punx
5 stars 7 forks source link

IndexError: when reading file from BlueSky NeXus writer #87

Closed prjemian closed 6 years ago

prjemian commented 7 years ago

I've proposed a NeXus data file writer to the BlueSky project.

Current version of punx (0.1.8) fails with IndexError while h5toText from spec2nexus does not. What's up with that?

full report:

jemian@gov .../EPICSADM/sandbox $ punx st developer_3.h5 
Traceback (most recent call last):
  File "/home/oxygen/JEMIAN/Apps/anaconda/bin/punx", line 11, in <module>
    sys.exit(main())
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/main.py", line 410, in main
    args.func(args)
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/main.py", line 162, in func_structure
    report = mc.report(show_attributes)
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/h5structure.py", line 103, in report
    structure = self._renderGroup(f, txt, indentation = "")
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/h5structure.py", line 155, in _renderGroup
    s += self._renderGroup(value, itemname, indentation+"  ")
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/h5structure.py", line 155, in _renderGroup
    s += self._renderGroup(value, itemname, indentation+"  ")
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/h5structure.py", line 143, in _renderGroup
    s += self._renderDataset(value, itemname, indentation+"  ")
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/h5structure.py", line 237, in _renderDataset
    s += self._renderAttributes(dset, indentation)
  File "/local/Apps/anaconda/lib/python2.7/site-packages/punx/h5structure.py", line 167, in _renderAttributes
    if isinstance(value[0], (bytes, numpy.bytes_)):
IndexError: index 0 is out of bounds for axis 0 with size 0
prjemian commented 7 years ago

developer_3.tree.txt

scan3

prjemian commented 7 years ago

developer_3.zip

prjemian commented 6 years ago

the code in bluesky is out of date and the h5structure module has been replaced, closing this wontfix issue now