[HDFView] Doesn't support string VLen datasets

Hello!

HDF Viewer, Version 3.0
For Windows 10

import h5py
import numpy as np
f = h5py.File('test.h5')
f.create_dataset('strings', data=np.array(['Lorem', 'ipsum'], 
dtype=h5py.special_dtype(vlen=str)))

h5dump test.h5
HDF5 “test.h5” {
GROUP “/” {
DATASET “strings” {
DATATYPE H5T_STRING {
STRSIZE H5T_VARIABLE;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_UTF8;
CTYPE H5T_C_S1;
}
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): “Lorem”, “ipsum”
}
}
}
}

But opening the dataset in HDFView gives
ScalarDS loadData:H5DreadVL_str: failed to read variable length strings

Fix appreciated!

Best wishes,
Andrey Paramonov

test.h5 (6.03 KB)

Hi Andrey,

I entered bug HDFView-201 for this issue.
It is possible that it is related to other UTF8 issue that was reported. However, the error message is different, so we should investigate.

Thanks!
-Barbara

Hi Andrey,

You seem to have a HDFView 3 that can view hdf5 files without the “unsupported file format” error: hdfview-3-0-cannot-open-files-created-with-1-8-18, could you tell us the hdf5 version it is based on. We think that the latest HDFView 3 on the website was built incorrectly.

Allen

Hi Allen!

02.10.2018 18:15, byrn пишет:

You seem to have a HDFView 3 that can view hdf5 files without the
“unsupported file format” error:
hdfview-3-0-cannot-open-files-created-with-1-8-18
https://forum.hdfgroup.org/t/hdfview-3-0-cannot-open-files-created-with-1-8-18/4937,
could you tell us the hdf5 version it is based on. We think that the
latest HDFView 3 on the website was built incorrectly.

As in the beginning of my message,

HDF Viewer, Version 3.0
For Windows 10
(from About box)

Please tell me how to obtain more detailed info.

Best wishes,
Andrey Paramonov

Hi Andrey,

under the Help menu there are also menu items for HDF4/HDF5 Library version. In the main window there are also buttons for this version information.

Hi Jordan!

02.10.2018 18:44, Jordan Henderson пишет:

under the Help menu there are also menu items for HDF4/HDF5 Library
version. In the main window there are also buttons for this version
information.

It says:
HDF5 1.10.3

Best wishes,
Andrey Paramonov

Hi again Andrey,

I believe that this confirms the issue Allen mentioned which we are seeing. We hope to resolve this soon.

As for your original problem here, we have made a few fixes in HDFView in regards to UTF-8, which is the reason you are encountering issues here. See the screenshot below from a development version of HDFView 3, where I can open your dataset just fine. Hopefully these fixes will make it into the new 3.1 release after we determine the cause of the above problem.

Hi Jordan!

02.10.2018 19:16, Jordan Henderson пишет:

I believe that this confirms the issue Allen mentioned which we are
seeing. We hope to resolve this soon.

As for your original problem here, we have made a few fixes in HDFView
in regards to UTF-8, which is the reason you are encountering issues
here. See the screenshot below from a development version of HDFView 3,
where I can open your dataset just fine. Hopefully these fixes will make
it into the new 3.1 release after we determine the cause of the above
problem.

This is great news – I can’t wait for the fix release :wink:

Best wishes,
Andrey Paramonov

Hi Jordan, Barbara!

I also noticed that my HDFView version doesn’t respect Display Indexing
Options/By Creation Order (although h5dump -q creation_order does). Is
it possible that it will be fixed in the upcoming re-release, too?

Best wishes,
Andrey Paramonov

02.10.2018 19:24, Andrey Paramonov пишет:

Hi Andrey,

I tested this and I believe you are correct, HDFView does not seem to respect the indexing type when set from the User Options dialog. However, if you right click on the root group of the file, you should see a menu item called “Change File Indexing”. If you set “By Creation Order” here and then reload the file, HDFView should then correctly display according to the indexing chosen.