Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: read_nexus fails on illegal AXISNAME_indices #436

Open
rettigl opened this issue Sep 23, 2024 · 0 comments
Open

[Bug]: read_nexus fails on illegal AXISNAME_indices #436

rettigl opened this issue Sep 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rettigl
Copy link
Collaborator

rettigl commented Sep 23, 2024

Contact Details

[email protected]

What happened?

When reading a nexus file that contains inside an NXdata section a AXISNAME_indices field, and the corresponding AXISNAME does not exist, read_nexus exits with a KeyError, rather than reporting the incorrect NXdata group.

Relevant log output

DEBUG: value:  
Traceback (most recent call last):
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/.pyenv/bin/read_nexus", line 8, in <module>
    sys.exit(main())
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/.pyenv/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/.pyenv/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/.pyenv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/.pyenv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/pynxtools/src/pynxtools/nexus/nexus.py", line 843, in main
    nexus_helper.process_nexus_master_file(None)
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/pynxtools/src/pynxtools/nexus/nexus.py", line 780, in process_nexus_master_file
    get_default_plotable(self.in_file, self.logger)
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/pynxtools/src/pynxtools/nexus/nexus.py", line 497, in get_default_plotable
    axis_helper(dim, nxdata, signal, axes, logger)
  File "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/pynxtools/src/pynxtools/nexus/nexus.py", line 621, in axis_helper
    and nxdata[attr.split("_indices")[0]] not in ax_list
  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 "/mnt/pcshare/users/Laurenz/AreaB/pynxtools/.pyenv/lib/python3.8/site-packages/h5py/_hl/group.py", line 357, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  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 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'pump_probe_delay2' doesn't exist)"
@rettigl rettigl added the bug Something isn't working label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant