I have a statepoint file and I am trying to asses it in python scripts as
import openmc
import numpy as np
sp1 = openmc.StatePoint(‘statepoint.120.h5’)
tally = sp1.tallies[1]
flux = tally.mean.ravel()
print(flux)
I am trying to access the tally data… when I run the script, the terminal is stuck. it never goes to anywhere. and, yes, the statepoint file name is correct. After a while i turn off the terminal process Ctrl+C, This is what I see, it looks the script is stuck in the statepoint initializing line. What am I missing here?
^CTraceback (most recent call last):
File “12.py”, line 9, in
sp1 = openmc.StatePoint(‘statepoint.120.h5’)
File “/opt/anaconda3/envs/openmc-env/lib/python3.8/site-packages/openmc/statepoint.py”, line 142, in init
su = openmc.Summary(path_summary)
File “/opt/anaconda3/envs/openmc-env/lib/python3.8/site-packages/openmc/summary.py”, line 57, in init
self._read_geometry()
File “/opt/anaconda3/envs/openmc-env/lib/python3.8/site-packages/openmc/summary.py”, line 107, in _read_geometry
self._read_surfaces()
File “/opt/anaconda3/envs/openmc-env/lib/python3.8/site-packages/openmc/summary.py”, line 125, in _read_surfaces
surface = openmc.Surface.from_hdf5(group)
File “/opt/anaconda3/envs/openmc-env/lib/python3.8/site-packages/openmc/surface.py”, line 459, in from_hdf5
bc = group[‘boundary_type’][()].decode()
File “h5py/_objects.pyx”, line 54, in h5py._objects.with_phil.wrapper
File “h5py/_objects.pyx”, line 55, in h5py._objects.with_phil.wrapper
File “/opt/anaconda3/envs/openmc-env/lib/python3.8/site-packages/h5py/_hl/dataset.py”, line 543, in getitem
self.id.read(mspace, fspace, arr, mtype)
KeyboardInterrupt