question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

help debugging `minor: Can't open object` related to attributes?

See original GitHub issue

To assist reproducing bugs, please include the following:

  • Operating System (e.g. Windows 10, MacOS 10.11, Ubuntu 16.04.2 LTS, CentOS 7)
  • Python version (e.g. 2.7, 3.5)
  • Where Python was acquired (e.g. system Python on MacOS or Linux, Anaconda on Windows)
  • h5py version (e.g. 2.6)
  • HDF5 version (e.g. 1.8.17)
  • The full traceback/stack trace shown (if it appears)

h5py.version.info contains the needed versions, which can be displayed by

python -c 'import h5py; print(h5py.version.info)'

where python should be substituted for the path to python used to install h5py with.

I get the following warnings when I open files and I am not really sure how to debug this or even narrow down where in my lengthy code it is taking place. Could someone offer some insights on debugging something like this?

minor: Can't open object
9265
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
9266
    major: Attribute
9267
    minor: Unable to initialize object
9268
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
9269
    major: Attribute
9270
    minor: Can't open object
9271
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
9272
    major: Attribute
9273
    minor: Object not found
9274
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
9275
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
9276
    major: Attribute
9277
    minor: Can't open object
9278
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
9279
    major: Virtual Object Layer
9280
    minor: Can't open object
9281
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
9282
    major: Virtual Object Layer
9283
    minor: Can't open object
9284
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
9285
    major: Attribute
9286
    minor: Can't open object
9287
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
9288
    major: Attribute
9289
    minor: Unable to initialize object
9290
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
9291
    major: Attribute
9292
    minor: Can't open object
9293
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
9294

This is on hosted github runner (ubuntu 20.04), using h5py.File through fsspec.filesystem to access files on Google Cloud buckets. All pieces of software are current (latest). Any suggestions? I could come back with a more verbose bug report if necessary. I will also try to narrow it down enough to make a small repro… but the tests do pass (i.e. the expected results are produced/extracted).

Observation, this so far only happens if h5py is installed via a PyPI wheel. It doesn’t happen if the tests are run in a conda env with the h5py conda package.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
tacaswellcommented, Aug 16, 2022

I mean if there are functions in libhdf5 that we do not expose we will definitely expose them (we tend to wait for a request / need rather than just exposing everything. There can be some work / thought required on how to expose it to Python “right”), we try to make Group work as much like dict as is technicallly possible and Dataset look as much like a numpy array as is technically possible (one of our tests is “does slicing do exactly the same thing”).

Anything beyond that, including domain specific functions, anything about the semantics of the data is out of scope for h5py, or API elaborations above those core abstractions are (in my view) out of scope.

1reaction
tacaswellcommented, Aug 14, 2022

This is very likely an issue with multiple wheels having copies of libhdf5 which are conflicting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

new dataset can only set two attributes with swmr mode #1910
when using swmr mode, a newly created dataset can only set two attributes. However, when not using swmr mode, this problem does not...
Read more >
Eclipse remote debugging, cannot see properties of object
If the class you are debugging was compiled without debug ifnormations, you can not debug the source code. You will only see the...
Read more >
Pinnable Properties: Debug & Display Managed Objects ...
This is a managed attribute that lets you customize how you view objects in debugging windows by “favoriting” specific properties.
Read more >
Simplify debugging with DebuggerDisplay attribute dotNET
Debugging our .NET applications can be cumbersome. With the DebuggerDisplay attribute we can simplify it by displaying custom messages.
Read more >
Debugging HTML - Learn web development | MDN
So there we have it, an introduction to debugging HTML, which should give you some useful skills to count on when you start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found