No cross_sections.xml specified, python API

Hello,

I’m setting up OpenMC on a new computer. I installed ubuntu, then I downloaded anaconda, and installed OpenMC through forge. I followed the “modeling a Pin-Cell” to verify everything was working, but ran into the runtime error for specifying cross_sections.xml in the materials.xml file. I downloaded the endf library from the OpenMC website, and I unpacked using tar in ubuntu. The materials file shows the path that I am setting with the python API, but it’s still not running the plot function.

I installed OpenMC on a different machine successfully about a year ago, and I remember running into something similar to this but I can’t recall how to resolve it.

Thanks for any help.

There are a few ways to solve this with the latest version of openmc.

Including a line like this in the python script is the newest.

The path should be changed to point to your cross sections XML file.

I would keep the cross sections XML file the same as it is when downloaded and not modify. Keep it in the same directory as the h5 files.

openmc.config['cross_sections'] ='/home/jshimwell/nucdata/cross_sections.xml'

Thank you! This seemed to work.