No such file or directory: '/tmp/tmphagsettj/plot_1.png'

Hello,
I have tried to run my code, but at the time of plotting figure, it is showing error that “No such file or directory: '/tmp/tmphagsettj/plot_1.png”


. How can I solve this problem? Thank you.

@Shamim welcome to the community! Are you able to share your notebook so that I can try to reproduce this error?

Hello Paulromano,

Thanks for your reply.

I have attached my notebook of 4x4 assembly. Please kindly check it. I could not plot any geometry. My ubuntu version is 20.04.5 LTS.
These are the code lines for plotting my desired geometry-
#water_pin_universe.plot(width=(2.5, 2.5), colors={wwater_inner_cell: ‘blue’, wclad_cell: ‘red’, wwater_outer_cell: ‘blue’})

#fuel1_universe.plot(width=(1.6, 1.6), colors={fuel1: ‘yellow’, gap1: ‘green’, clad1: ‘red’, moderator1: ‘blue’})

#root_universe.plot(width=(6.4, 6.4), colors={fuel1: ‘yellow’, gap1: ‘green’, clad1: ‘red’, moderator1: ‘blue’})

Thank you.

Regards
Shamim
Untitled.ipynb (11.5 KB)

@Shamim I believe this error occurs because your version of OpenMC was not built against libpng, which is used for plotting. On Ubuntu, you should run:

sudo apt install libpng-dev

and then rebuild OpenMC (cmake and make)

I’ll also mention that I submitted a bug fix so that future versions of OpenMC don’t run into this same problem:

Thanks paulromano, I have solved the problem installing Ubuntu version 18.04.5.