openmc.Material error when running in Spyder

I’ve exported a Jupyter Notebook to a .py format that I’m trying to run in Spyder, but I’m running into an error. When trying to create the first cell, I get an error saying:
File “/home/yogdog/Documents/openmc/Depletion files to send/cladding material/test/”, line 93, in
fuel_cell = openmc.Cell(fill=fuel_salt, region=fuel_region,name=‘fuel cell’)
File “/home/yogdog/.local/lib/python3.8/site-packages/openmc/”, line 105, in init
self.fill = fill
File “/home/yogdog/.local/lib/python3.8/site-packages/openmc/”, line 280, in fill
elif not isinstance(fill, (openmc.Material, openmc.Lattice,
AttributeError: module ‘openmc’ has no attribute ‘Material’

Any ideas why this is happening? For reference, this is the line of code being run that causes the error:
fuel_cell = openmc.Cell(fill=fuel_salt, region=fuel_region,name=‘fuel cell’)

There were no problems in creating the fuel_salt material, so I’ve got no idea what’s going on.

Hi @yogdog and welcome to the discourse forum!

That’s an odd error to see coming from a call to the openmc module. A couple of possibilities come to mind when looking at that trace:

  1. the name associated with the OpenMC module (openmc) has been updated to something else by mistake. I’d need to look at the entire Python file you’re running to see.

  2. Something went wrong with your OpenMC installation and the file is missing under /home/yogdog/.local/lib/python3.8/site-packages/openmc/. This is an easy one to check.

If you’re able to share your Python script I’d be happy to give it a try and see what’s going on.