Custom Source Issues

Hello. I am a college student, relatively new to using OpenMC, and am having issues using a .h5 custom format source. The source is made from a MCPL file, and currently works on my Professor’s laptop, but not on mine or our lab computer’s. We used slightly different installation packages, but the rest of the program has been working fine.
Here is the source section of the code:
#Settings
settings = openmc.Settings()
settings.run_mode = ‘fixed source’
settings.particles = 50000
settings.batches = 5
#IssueHere!!
settings.source = openmc.Source(filename=‘custom_source.h5’)
settings.export_to_xml()

…and the error message I receive is:

TypeError: IndependentSource.init() got an unexpected keyword argument ‘filename’

Any help would be appreciated. Thanks!

Hello
There isn’t file_path parameter in openmc.source() class,so I think maybe you shoud load the .h5 file in other way?

If you are using the developmental version of OpenMC (which it appears you are by virtue of using IndependentSource), file-based sources got separated out into a separate class, so now you should write:

settings.source = openmc.FileSource('custom_source.h5')