OpenMC aborts when attempting to plot

I’m having issues plotting a hexagonal lattice on openMC. it gives me the error:

Traceback (most recent call last):
File “/Users/christianandresclaro/code/matt_test”, line 99, in
plot = hex_universe.plot(pixels=(600, 600), color_by=‘material’, colors={fuel_kernel: ‘black’, coolant: ‘yellow’})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/christianandresclaro/miniconda3/envs/openmc_new/lib/python3.12/site-packages/openmc/universe.py”, line 446, in plot
model.plot_geometry(False, cwd=tmpdir, openmc_exec=openmc_exec)
File “/Users/christianandresclaro/miniconda3/envs/openmc_new/lib/python3.12/site-packages/openmc/model/model.py”, line 828, in plot_geometry
openmc.plot_geometry(output=output, openmc_exec=openmc_exec)
File “/Users/christianandresclaro/miniconda3/envs/openmc_new/lib/python3.12/site-packages/openmc/executor.py”, line 154, in plot_geometry
_run(args, output, cwd)
File “/Users/christianandresclaro/miniconda3/envs/openmc_new/lib/python3.12/site-packages/openmc/executor.py”, line 125, in _run
raise RuntimeError(error_msg)
RuntimeError: OpenMC aborted unexpectedly.

I am running this on a mac and was originally having issues with cross sections. I believe this was remedied but now it wont generate plots. when i exclude the following lines:

plot = hex_universe.plot(pixels=(600, 600), color_by=‘material’, colors={fuel_kernel: ‘black’, coolant: ‘yellow’})

plt.show()

the program compiles just fine.

Hi @cclaro and welcome to the community! What output do you see if you try to run this from a terminal?

Can you elaborate on what you mean when you say running from a terminal? I am running the program off vs code which gives an output from its own built in terminal. This is the output I get in the terminal within vs code with the plotting section of the code removed.

christianandresclaro@Christians-MacBook-Pro-2 code % /Users/christianandresclaro/miniconda3/envs/openmc_new/bin/python /Users/christianandresclaro/code/matt_test
HexLattice
ID = 7
Name = hex_geom
Orientation = y
# Rings = 10
# Axial = None
Center = (0.0, 0.0)
Pitch = (1.88,)
Outer = 6
Universes
3
1 1
1 1 1
3 3 1 3
1 1 1 3 1
1 1 3 1 1 1
3 3 1 3 3 1 3
1 1 1 1 1 1 3 1
1 1 3 1 1 1 1 1 1
3 3 1 3 3 1 3 3 1 3
1 1 1 1 1 3 1 1 3
1 3 1 1 3 1 1 1 1 1
1 3 3 1 3 3 1 3 1
1 1 1 1 1 1 1 3 3 1
3 1 3 1 1 1 1 1 1
3 1 1 3 2 2 3 1 1 3
1 1 1 1 6 1 3 1 3
1 3 3 1 6 6 1 1 1 1
1 3 1 2 6 2 1 3 1
1 1 1 1 6 6 1 3 3 1
3 1 3 1 6 1 1 1 1
3 1 1 3 2 2 3 1 1 3
1 1 1 1 1 1 3 1 3
1 3 3 1 1 1 1 1 1 1
1 3 1 3 3 1 3 3 1
1 1 1 1 1 3 1 1 3 1
3 1 1 3 1 1 1 1 1
3 1 3 3 1 3 3 1 3 3
1 1 1 1 1 1 3 1 1
1 3 1 1 1 1 1 1
3 1 3 3 1 3 3
1 1 1 3 1 1
1 3 1 1 1
3 1 3 3
1 1 1
1 1
3
(0, 0)
(0,23) (0, 1)
(0,22) (1, 0) (0, 2)
(0,21) (1,17) (1, 1) (0, 3)
(0,20) (1,16) (2, 0) (1, 2) (0, 4)
(1,15) (2,11) (2, 1) (1, 3)
(0,19) (2,10) (3, 0) (2, 2) (0, 5)
(1,14) (3, 5) (3, 1) (1, 4)
(0,18) (2, 9) (4, 0) (2, 3) (0, 6)
(1,13) (3, 4) (3, 2) (1, 5)
(0,17) (2, 8) (3, 3) (2, 4) (0, 7)
(1,12) (2, 7) (2, 5) (1, 6)
(0,16) (1,11) (2, 6) (1, 7) (0, 8)
(0,15) (1,10) (1, 8) (0, 9)
(0,14) (1, 9) (0,10)
(0,13) (0,11)
(0,12)

Ok, just wasn’t sure if there was more information about the error that was showing up in the terminal (in case you were running from a Jupyter notebook). Hard to say what’s going on based on the information given. Are you able to share a minimal example script that someone can try to reproduce the error with?

I’m currently reinstalling everything from source to make sure everything is properly configured. I can provide a sample script if this doesn’t solve the issue. Let me get back to you once this is complete as we are having some issues

It is also worth mentioning this error does not occur when running on one of my peers laptops. This only occurs on my own device.