Coder Social home page Coder Social logo

Comments (7)

mattjala avatar mattjala commented on June 14, 2024

From further testing, this error doesn't have anything to do with UTF-8 encoding. It happens when attempting to write a sequence of variable-length strings of any type, because HSDS's current schema for sequences (4 byte length following by the rest of the data) has no way to delineate non-fixed length strings within that sequence.

from hsds.

jreadey avatar jreadey commented on June 14, 2024

Doesn't testPutVLenCompoundBinary in vlen_test.py have vlen and fixed types in the same compound type?

from hsds.

mattjala avatar mattjala commented on June 14, 2024

Doesn't testPutVLenCompoundBinary in vlen_test.py have vlen and fixed types in the same compound type?

Yes, but that test doesn't cover a variable-length sequence of variable length strings.

That said, one of the fields in that test is an H5T_ARRAY that contains two variable-length strings, which seems like it would have run into this same issue - how does it know where the first vlen string stops and the second vlen string starts? I'll take a look at that and see if whatever is done there could apply to this case.

from hsds.

jreadey avatar jreadey commented on June 14, 2024

But currently vlen data isn't supported with H5T_ARRAY - see https://github.com/HDFGroup/hsds/blob/master/hsds/util/hdf5dtype.py, line 663

from hsds.

jreadey avatar jreadey commented on June 14, 2024

It might be easiest to use msgpack going forward.
I noodled around with it a bit today. See: https://gist.github.com/jreadey/acafbc048c13ed245beae22619c3ac5c

from hsds.

mattjala avatar mattjala commented on June 14, 2024

But currently vlen data isn't supported with H5T_ARRAY - see https://github.com/HDFGroup/hsds/blob/master/hsds/util/hdf5dtype.py, line 663

H5T_ARRAY doesn't allow its base type to be a variable length sequence (type of class H5T_VLEN), but it is allowed to be a variable length string (string with length H5T_VARIABLE) - see

"length": "H5T_VARIABLE",

from hsds.

mattjala avatar mattjala commented on June 14, 2024

This behavior is now properly tested as an expected failure (since vlen sequences of vlen data aren't supported) by testPutVlenVlenError

from hsds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.