How to solve: "OSError: Error reading file './chain_simple.xml': failed to load external entity "./chain_simple.xml"

I tried to launch this demo case-- pincell depletion.

but I encountered issue in line 25, could you help me locate it?


OSError Traceback (most recent call last)
in
----> 1 chain = openmc.deplete.Chain.from_xml("./chain_simple.xml")

~/.local/lib/python3.8/site-packages/openmc/deplete/chain.py in from_xml(cls, filename, fission_q)
535
536 # Load XML tree
→ 537 root = ET.parse(str(filename))
538
539 for i, nuclide_elem in enumerate(root.findall(‘nuclide’)):

src/lxml/etree.pyx in lxml.etree.parse()

src/lxml/parser.pxi in lxml.etree._parseDocument()

src/lxml/parser.pxi in lxml.etree._parseDocumentFromURL()

src/lxml/parser.pxi in lxml.etree._parseDocFromFile()

src/lxml/parser.pxi in lxml.etree._BaseParser._parseDocFromFile()

src/lxml/parser.pxi in lxml.etree._ParserContext._handleParseResultDoc()

src/lxml/parser.pxi in lxml.etree._handleParseResult()

src/lxml/parser.pxi in lxml.etree._raiseParseError()

OSError: Error reading file ‘./chain_simple.xml’: failed to load external entity “./chain_simple.xml”

Many thanks!

Solution tried: use download-xs.sh in home/openmc/tools/ci to re-download the library and add it to the environment, but it has no effect.

You can find the chain_simple.xml file in the tests/ directory of the OpenMC repository:

Many Thanks. got it.

Hi there,

I have tried all the same but this won’t work in my case. Can you please let me know why this is so?

You need to provide the chain file not the Chain object to Operator

op = openmc.deplete.Operator(geometry, settings, "./chain_simple.xml")

how did you solve this problem?