Depletion calculation no xsection xml error

Hi,
I am trying to run the pin cell example for depletion calculation. But I am getting this error message “OSError: No cross_sections.xml specified in materials.”. Here is a part my input
materials = openmc.Materials([fuel, clad, water])
settings.export_to_xml()
fuel.volume = math.pi * radii[0] ** 2
materials.cross_sections= ‘…/JEFF33_hdf5/cross_sections.xml’
materials.export_to_xml()
import openmc.deplete
chain = ‘./chain_simple.xml’
operator = openmc.deplete.Operator(geometry, settings, chain)
power = 174
Thank you in advance.

Hi @Yohannes. What version of OpenMC are you using? It used to be the case that you had to use the OPENMC_CROSS_SECTIONS environment variable when running depletion calculations, but @andrewjohnson added a fix in version 0.12.2 that allows the materials.cross_sections attribute to be used.

Hi @paulromano Thank you for the reply. I am running the same version but it worked with the cross sections env variable. Maybe a revisit to the fix if there still are some bugs!?

@Yohanes I haven’t been able to reproduce the behavior you’re seeing with version 0.12.0 or with the latest developmental branch. Are you able to post your entire script?

depl2.py (3.5 KB)
@paulromano Hi, sorry for the late reply, I was away from work for sometime. I attached my script. However, I changed somethings, which I don’t remember since the last conversation. The openmc Version is 0.12.2

@paulromano I just figured out that the cross_sections.xml and the chain_file can be merged using the DataLibrary. I haven’t tried this option but I think is the answer for my question I guess.

@Yohannes There is actually a bug here when the OPENMC_CROSS_SECTIONS environment variable is not set. I have a fix ready to go that I’ll submit a pull request for, so this should make it into the next version.

A fix for this issue has just been submitted for review.