Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'openmc' has no attribute 'SourceBase' #60

Open
BorKos opened this issue Nov 3, 2023 · 1 comment
Open

'openmc' has no attribute 'SourceBase' #60

BorKos opened this issue Nov 3, 2023 · 1 comment

Comments

@BorKos
Copy link

BorKos commented Nov 3, 2023

Hey Jonathan, I've been playing around with your handy OpenMC tools, specifically the plotters. I've encountered this error with both the standalone source plotter and the OpenMC plot utility. Both were installed with pip. Should I be using a different version of OpenMC? I'm currently running version 0.13.3 (I dumped the version info at the end of the email. Thanks, Bor

AttributeError: module 'openmc' has no attribute 'SourceBase'
Traceback:
File "/home/bor/anaconda3/envs/openmc-env/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "/home/bor/anaconda3/envs/openmc-env/lib/python3.11/site-packages/openmc_plot/pages/3_✴️_Source_plot.py", line 4, in
import openmc_source_plotter
File "/home/bor/anaconda3/envs/openmc-env/lib/python3.11/site-packages/openmc_source_plotter/init.py", line 16, in
from .core import *
File "/home/bor/anaconda3/envs/openmc-env/lib/python3.11/site-packages/openmc_source_plotter/core.py", line 220, in
openmc.SourceBase.sample_initial_particles = sample_initial_particles
^^^^^^^^^^^^^^^^^

OpenMC version 0.13.3
Git SHA1: 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c
Copyright (c) 2011-2023 MIT, UChicago Argonne LLC, and contributors
MIT/X license at https://docs.openmc.org/en/latest/license.html
Build type: Release
Compiler ID: GNU 11.3.0
MPI enabled: no
Parallel HDF5 enabled: no
PNG support: yes
DAGMC support: yes
libMesh support: no
MCPL support: no
NCrystal support: no
Coverage testing: no
Profiling flags: no

@shimwell
Copy link
Member

shimwell commented Nov 3, 2023

ah sorry about that, it probably needs the current development branch of openmc

version 0.14.0 of openmc is looking like it will be released on conda in a few days.

perhaps we can wait for that release and then I can add some python code that checks the version is at least 0.14.0

many thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants