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

fails with h5py 3 #1

Closed
drew-parsons opened this issue Aug 25, 2021 · 2 comments
Closed

fails with h5py 3 #1

drew-parsons opened this issue Aug 25, 2021 · 2 comments
Assignees

Comments

@drew-parsons
Copy link

bag explorer needs to be updated to work with h5py 3.

h5py changed the way the file mode is set when accessing .h5 files. The mode now needs to be given explicitly.

Test logs report

.EEE.....
======================================================================
ERROR: test_bag_File_filename (test_hydroffice_bag_base.TestBagBase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest-lxc.niorsqvb/downtmp/autopkgtest_tmp/tests/test_hydroffice_bag_base.py", line 34, in test_bag_File_filename
    bag_0 = File(self.file_bag_0)
  File "/usr/lib/python3/dist-packages/hydroffice/bag/base.py", line 69, in __init__
    super(File, self).__init__(name=name, mode=mode, driver=driver,
  File "/usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/_hl/files.py", line 444, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/_hl/files.py", line 215, in make_fid
    raise ValueError("Invalid mode; must be one of r, r+, w, w-, x, a")
ValueError: Invalid mode; must be one of r, r+, w, w-, x, a

======================================================================
ERROR: test_bag_File_open (test_hydroffice_bag_base.TestBagBase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest-lxc.niorsqvb/downtmp/autopkgtest_tmp/tests/test_hydroffice_bag_base.py", line 30, in test_bag_File_open
    self.assertIsNotNone(File(self.file_bag_0))
  File "/usr/lib/python3/dist-packages/hydroffice/bag/base.py", line 69, in __init__
    super(File, self).__init__(name=name, mode=mode, driver=driver,
  File "/usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/_hl/files.py", line 444, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/_hl/files.py", line 215, in make_fid
    raise ValueError("Invalid mode; must be one of r, r+, w, w-, x, a")
ValueError: Invalid mode; must be one of r, r+, w, w-, x, a

======================================================================
ERROR: test_bag_File_raise (test_hydroffice_bag_base.TestBagBase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest-lxc.niorsqvb/downtmp/autopkgtest_tmp/tests/test_hydroffice_bag_base.py", line 27, in test_bag_File_raise
    File(self.file_fake_0)
  File "/usr/lib/python3/dist-packages/hydroffice/bag/base.py", line 69, in __init__
    super(File, self).__init__(name=name, mode=mode, driver=driver,
  File "/usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/_hl/files.py", line 444, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/_hl/files.py", line 215, in make_fid
    raise ValueError("Invalid mode; must be one of r, r+, w, w-, x, a")
ValueError: Invalid mode; must be one of r, r+, w, w-, x, a

----------------------------------------------------------------------
Ran 9 tests in 0.003s

FAILED (errors=3)

full log https://ci.debian.net/data/autopkgtest/testing/amd64/h/hydroffice.bag/14823832/log.gz ,

This log is for v0.2.15, but the version in github gives the same error.

@giumas giumas transferred this issue from hydroffice/hyo_bag Sep 20, 2021
@giumas
Copy link
Contributor

giumas commented Sep 21, 2021

Hi Drew!

The hyo.bag library is deprecated.

There is release of HDF Compass supporting Python 3 and using the new hyo2.bag. There I fixed the 3 failing tests.

Cheers,
Giuseppe

@giumas giumas closed this as completed Sep 21, 2021
@drew-parsons
Copy link
Author

Ah good, thanks Guiseppe, thanks for letting me know.

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

No branches or pull requests

2 participants