[yt-users] IO error

Nick Gnedin ngnedin at gmail.com
Mon Jul 10 08:53:30 PDT 2017


Folks,

I have encountered a bizarre IO error. I am reading a file previously 
created by yt HOP halo finder on two separate machines. The file reads 
correctly on the machine it was created on, but on another machine with 
the most recent anaconda install (yt 3.3.5) the format is not 
recognized. Both machines are little endian. Is there any way to get 
more info on what yt does not like about that file?

yt : [ERROR    ] 2017-07-10 10:46:00,454 Couldn't figure out output type 
for hop.0.h5
Traceback (most recent call last):
   File "hmf.py", line 14, in <module>
     Plot("hop.0.h5",color="b")
   File "hmf.py", line 8, in Plot
     my_halos = load(file)
   File "/ext/anaconda3/lib/python3.6/site-packages/yt/convenience.py", 
line 98, in load
     raise YTOutputNotIdentified(args, kwargs)
yt.utilities.exceptions.YTOutputNotIdentified: Supplied ('hop.0.h5',) 
{}, but could not load!

Here is the script (taken form your examples):


import yt
from yt.mods import *
from yt.analysis_modules.halo_mass_function.api import *
import matplotlib.pyplot as plt

def Plot(file,color="r"):
     my_halos = load(file)
     hmf = HaloMassFcn(halos_ds=my_halos)
     plt.loglog(hmf.masses_analytic, 
hmf.n_cumulative_analytic,color="orange",linewidth=3)
     plt.loglog(hmf.masses_sim, 
hmf.n_cumulative_sim,color=color,linewidth=3)

Plot("hop.0.h5",color="b")


Thank you for your advice,

Nick Gnedin


More information about the yt-users mailing list