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

Reading compound dataset with string contents errors #393

Closed
pfitzseb opened this issue Apr 27, 2017 · 4 comments
Closed

Reading compound dataset with string contents errors #393

pfitzseb opened this issue Apr 27, 2017 · 4 comments

Comments

@pfitzseb
Copy link

This line errors when trying to read a compound dataset with string contents. Specifically, unpad is defined to take a String and a Cint as inputs, while read(io, UInt8, dsize) is an Array of UInt8s and H5T_STR_NULLPAD is a Int64 on my machine, while Cint is an alias for Int32.

Wrapping the read in a String constructor and relaxing unpads second argument's type restriction should work imho, but with my sample dataset I'm then getting a UnicodeError: invalid character index. I'm not sure if that's specific to my dataset's layout though (the Vector{UInt8} read spits out doesn't seem to be related to the string I'm expecting there at all, which might be a deeper issue).

I'd be happy to investigate this more, but I think I'll need some guidance from someone more familiar with the codebase...

cc @grahamrow, because you implemented read_row in #365

@pfitzseb pfitzseb changed the title Compound dataset with string contents error Reading compound dataset with string contents errors Apr 27, 2017
@musm
Copy link
Member

musm commented May 6, 2017

@grahamrow could you please take a look at this? thanks

@pfitzseb
Copy link
Author

Small file that reproduces this issue:
compound_dataset.zip

@musm
Copy link
Member

musm commented Nov 21, 2017

Hmm, so is it not correctly identifying the membertype?
It fails for this 'string'
UInt8[0x60, 0xa2, 0x01, 0x00, 0xe8, 0x03, 0x00, 0x00]
what are you expected there?

@kleinhenz
Copy link
Contributor

This should be closed by #592.

@musm musm closed this as completed Mar 7, 2020
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

3 participants