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

Upgrading 1.4.9 files fail #509

Closed
matham opened this issue Jun 29, 2021 · 1 comment · Fixed by #510
Closed

Upgrading 1.4.9 files fail #509

matham opened this issue Jun 29, 2021 · 1 comment · Fixed by #510
Labels

Comments

@matham
Copy link
Member

matham commented Jun 29, 2021

I have some files I created with 1.4.9, IIRC. I was trying to upgrade it with 1.5.0 and I got the following error:

$ nixio upgrade ceed/examples/data/2_stage_protocol.h5
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python37\Lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\user\AppData\Local\Programs\Python\Python37\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "E:\Python\Python37\Scripts\nixio.exe\__main__.py", line 7, in <module>
  File "e:\python\python37\lib\site-packages\nixio\cmd\main.py", line 42, in main
    cmdmap[cmd](args)
  File "e:\python\python37\lib\site-packages\nixio\cmd\upgrade.py", line 263, in main
    tasklist = collect_tasks(fname)
  File "e:\python\python37\lib\site-packages\nixio\cmd\upgrade.py", line 236, in collect_tasks
    alias_task = update_alias_range_dimension(fname)
  File "e:\python\python37\lib\site-packages\nixio\cmd\upgrade.py", line 146, in update_alias_range_dimension
    for data_array in block["data_arrays"].values():
  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 "e:\python\python37\lib\site-packages\h5py\_hl\group.py", line 264, 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 'data_arrays' doesn't exist)"

I'm not aware of any reason this would fail. Here's the file:
2_stage_protocol.zip.

Thanks!

@jgrewe jgrewe added the bug label Jun 29, 2021
@jgrewe
Copy link
Member

jgrewe commented Jun 29, 2021

Dear @matham, sorry for the inconvenience and thanks for the report. It seems the upgrade script fails when there are no DataArrays in the file (which it should survive), i.e. the data_array in block["data_arrays"].values() command fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants