silx-kit / vscode-h5web

VSCode extension to explore and visualize HDF5 files
https://marketplace.visualstudio.com/items?itemName=h5web.vscode-h5web
MIT License
33 stars 5 forks source link

Extension does not know how to serialize a BigInt #15

Closed rmnldwg closed 1 year ago

rmnldwg commented 2 years ago

Describe the bug

When I store an integer as an attribute to e.g. a dataset in an HDF5 file, the H5Web extension does not display any attributes, but prints in red Do not know how to serialize a BigInt.

To Reproduce

  1. Select the HDF5 file in VS Code explorer
  2. Go to the dataset/group that has an integer as an attribute
  3. Click on "inspect" in the top right corner
  4. Scroll down to the Attributes section
  5. See error --> Instead of the attributes, the extension shows Do not know how to serialize a BigInt in red.

I have created a tiny Python script that creates an HDF5 file that - when displayed in the VS code extension - leads to the described bug.

Here's also the resulting HDF5 file zipped: h5web_bug.zip

Expected behaviour

I would expect to see the attributes, instead of the error message.

Screenshots

2022-08-16

Context

loichuder commented 2 years ago

Hello @rmnldwg, thanks for raising the issue, even more so for providing a way to reproduce it !

I recently added support for int64 for dataset values (https://github.com/silx-kit/h5web/pull/1179) so it should be quite simple to do the same for attribute values.

Expect this to be fixed in the next release :slightly_smiling_face:

rmnldwg commented 2 years ago

Amazing, thanks for the info!

Great extension by the way, it makes my job so much more seamless 👍🏻

axelboc commented 2 years ago

Hi @rmnldwg, the issue should now be fixed in v0.0.5. Please let us know if that's not the case 😉

axelboc commented 1 year ago

Re-opening as per https://github.com/silx-kit/vscode-h5web/issues/30