[SciPy-User] opening a hdf5 file using h5py
Robin M Baur
rmb62 at cornell.edu
Sat Jun 18 11:33:35 EDT 2011
The h5py list is over here: https://groups.google.com/group/h5py
That said, it looks like you're trying to read a file that doesn't
exist. Does f = h5py.File('eg.hdf5', 'w') work?
Robin
On Sat, Jun 18, 2011 at 11:28, Bala subramanian
<bala.biophysics at gmail.com> wrote:
> Friends,
> I am a newbie to using hdf5 files. I need to work on hdf5 format file. To do
> this, i installed h5py and numpy (in fedora 14) and to make sure if it
> works, I tried to open a hdf5 format file using the following code as given
> in the example section of h5py home page.
>
> #!/usr/bin/env python
> import h5py
> f=h5py.File('eg.hdf5','r')
>
> I am getting the following error. Someone kindly write me what is the
> problem here. I tried to google the error but i am not understanding what is
> going wrong.
>
> Traceback (most recent call last):
> File "test.py", line 4, in <module>
> f=h5py.File('eg.hdf5','r')
> File
> "/usr/lib64/python2.7/site-packages/h5py-1.3.1-py2.7-linux-x86_64.egg/h5py/highlevel.py",
> line 797, in __init__
> self.fid = self._generate_fid(name, mode, plist)
> File
> "/usr/lib64/python2.7/site-packages/h5py-1.3.1-py2.7-linux-x86_64.egg/h5py/highlevel.py",
> line 831, in _generate_fid
> fid = h5f.open(name, h5f.ACC_RDONLY, fapl=plist)
> File "h5f.pyx", line 68, in h5py.h5f.open (h5py/h5f.c:1268)
> h5py.h5e.LowLevelIOError: Unable to find a valid file signature (Low-level
> I/O: Unable to initialize object)
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
More information about the SciPy-User
mailing list