materialize.load_from_hdf5() Error

19 views
Skip to first unread message

Kevin McLaughlin

unread,
Dec 12, 2022, 4:22:28 PM12/12/22
to OpenMOC Users Group
Hi All,

I am running into a type error when I use the materialize.load_from_hdf5() function:

File ~/mambaforge/lib/python3.9/site-packages/openmoc/materialize.py:44, in _get_numpy_array(hdf5_group, key, suffix) 
41 def _get_numpy_array(hdf5_group, key, suffix):
42 """A helper routine to ensure that MGXS data is a proper NumPy array""" ---> 
44 sigma = np.array(hdf5_group['{}/'.format(key) + suffix][...]) 
45 sigma = np.atleast_1d(sigma) 
46 sigma = sigma.flatten() 

 File h5py/_objects.pyx:54, in h5py._objects.with_phil.wrapper() 
 File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()
...
331 " not {}".format(type(name))) 
333 otype = h5i.get_type(oid) 
334 if otype == h5i.GROUP: 
  TypeError: Accessing a group is done with bytes or str, not <class 'ellipsis'>

Does anyone have an idea of how I can resolve this error?

Thanks!
Kevin

Travis Labossiere

unread,
Jan 11, 2023, 8:19:26 PM1/11/23
to openmo...@googlegroups.com
Kevin,

What version of h5py are you using with OpenMOC?

--
You received this message because you are subscribed to the Google Groups "OpenMOC Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmoc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openmoc-users/a3c4beb9-afb9-4b5c-b8d3-8e366a4ee74bn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages