Open ahalota opened 8 years ago
I found a solution in setting my value to be [data], i.e. a 1d array.
A little strange since the test file doesn't do this, but it fixed my problem.
Ha, and of course now I see that there already IS a last modified attribute by default anyways. Well then...
h5serv is expecting the data values to math the type and shape of the attribute. Is does seem like h5serv should give an error if a one-element is array is expected, but a scalar value is given. I'll re-open this as a reminder to investigate.
BTW, if you use a scalar shape, you'll be able to pass just the value. There are some examples in the attributetest.py file.
I am adding an attribute to a dataset I created using the h5server.
The code I used is as follows, mostly copied from attributetest.py file:
The code runs fine and does not show any error, but I noticed that it is only filling in the first value for the attribute. So, if I have year 2016, even though my data = '2016-06-10', the value in my attribute is '2'. If I change it to year = 1000, the value in my attribute is '1'.
Currently the uuid given is one for a group.
What am I doing wrong here?