[yt-users] h5py problem

John ZuHone jzuhone at cfa.harvard.edu
Tue Jul 5 14:34:51 PDT 2011


Hi all,

I  have a loop that goes over a list of filenames I've generated, loads parameter files for them, passes each pf object to a procedure which grabs data from the file, and then loops back over. After the first iteration, I get this crash:

Traceback (most recent call last):
  File "/local/data/duce2/zuhone/src/ctools/filter_particle_velocities.py", line 91, in <module>
    main()
  File "/local/data/duce2/zuhone/src/ctools/filter_particle_velocities.py", line 68, in main
    compute_turb_vels(pf, numVelCells, xp, yp, zp, vxp, vyp, vzp)
  File "/local/data/duce2/zuhone/src/ctools/compute_turb_vels.py", line 15, in compute_turb_vels
    leaf_grids = [g for g in pf.h.grids if len(g.Children) == 0]
  File "/local/data/duce2/zuhone/opt/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 163, in hierarchy
    self, data_style=self.data_style)
  File "/local/data/duce2/zuhone/opt/yt-x86_64/src/yt-hg/yt/frontends/flash/data_structures.py", line 73, in __init__
    self._handle = h5py.File(self.hierarchy_filename)
  File "/local/data/duce2/zuhone/opt/yt-x86_64/lib/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 "/local/data/duce2/zuhone/opt/yt-x86_64/lib/python2.7/site-packages/h5py-1.3.1-py2.7-linux-x86_64.egg/h5py/highlevel.py", line 842, in _generate_fid
    fid = h5f.create(name, h5f.ACC_EXCL, fapl=plist)
  File "h5f.pyx", line 87, in h5py.h5f.create (h5py/h5f.c:1378)
h5py._stub.IOError: File exists (File accessability: Unable to open file)

It does not matter where in the list of files I start, so it's not due to a single bad file. It's like it doesn't detect the file it's trying to read somehow, so it tries to create it, but then it finds out it already exists, and then aborts. Very odd. 

Best,

John ZuHone


More information about the yt-users mailing list