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

nested keys fail on re-assigment #77

Open
jmcloughlin opened this issue Jul 9, 2014 · 0 comments
Open

nested keys fail on re-assigment #77

jmcloughlin opened this issue Jul 9, 2014 · 0 comments

Comments

@jmcloughlin
Copy link
Contributor

In [1]: io = la.IO('test.h5')

In [2]: io['a'] = la.lrange(10)

In [3]: io['b/c/d'] = la.lrange(30)

In [4]: io
Out[4]: 
larry  dtype  shape
-------------------
a      int64  (10,)
b/c/d  int64  (30,)


In [5]: io['a'] = la.lrange(30)

In [6]: io['b/c/d'] = la.lrange(30)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-6-3bbe3a8557ba> in <module>()
----> 1 io['b/c/d'] = la.lrange(30)

/home/jmcl/devel/la/la/io.pyc in __setitem__(self, key, value)
    193 
    194         # If you've made it this far the data looks OK so save it
--> 195         save(f, value, key)
    196 
    197         f.close()

/home/jmcl/devel/la/la/io.pyc in save(file, lar, key)
    456     fkey = f[key]
    457     fkey.attrs['larry'] = True
--> 458     fkey['x'] = lar.x
    459     for i in range(lar.ndim):
    460         arrays, datetime_types = _label2arrays(lar.label[i])

/usr/local/lib/python2.7/dist-packages/h5py/_hl/group.pyc in __setitem__(self, name, obj)
    269         else:
    270             ds = self.create_dataset(None, data=obj, dtype=base.guess_dtype(obj))
--> 271             h5o.link(ds.id, self.id, name, lcpl=lcpl)
    272 
    273     def __delitem__(self, name):

/usr/local/lib/python2.7/dist-packages/h5py/h5o.so in h5py.h5o.link (h5py/h5o.c:3094)()

RuntimeError: unable to create link (Links: Unable to initialize object)

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

1 participant