statepoint file is not reading with python script.

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

When you load a statepoint, it tries to automatically load information about the geometry from the summary.h5 file (if present). One way of getting around this to at least get your tally results is to run;

sp1 = openmc.StatePoint('statepoint.120.h5', autolink=False)

That being said, I don’t see any obvious reason why loading the summary file would fail. Are you able to share the model?

Greetings Dr. It worked after a while. The reason I think is because of complicated geometry.