# CalledProcessError: Command '\['convert', 'voxelPlot.ppm', 'voxelPlot.png'\]' returned non-zero exit status 1

**URL:** https://openmc.discourse.group/t/calledprocesserror-command-convert-voxelplot-ppm-voxelplot-png-returned-non-zero-exit-status-1/1534
**Category:** User Support
**Created:** [November 14, 2021, 2:49pm UTC](https://openmc.discourse.group/t/calledprocesserror-command-convert-voxelplot-ppm-voxelplot-png-returned-non-zero-exit-status-1/1534 "2021-11-14T14:49:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lz152](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/lz152/32/1547_2.png) [@lz152](https://openmc.discourse.group/u/lz152)
#### Post date: [November 14, 2021, 2:49pm UTC](https://openmc.discourse.group/t/calledprocesserror-command-convert-voxelplot-ppm-voxelplot-png-returned-non-zero-exit-status-1/1534/1 "2021-11-14T14:49:38Z")

</div>

Hi guys,  
I am new here ! I need some help ! the problem in creating voxelPlot.h5 stucks on me. I don’t know why the “voxelPlot.ppm” and “voxelPlot.png” could not be created when running.  
and the plotting part is below:(sorry ,maybe the problem is easy ,but I still need your help !!! )  
#-----------------------------------------------------------------#

# Instantiate a Plot

plot1 = openmc.Plot()  
plot1.filename = ‘materials-xz’  
plot1.basis = ‘xz’  
plot1.origin = [0, 0, 0]  
plot1.width = [7.2135, 360]  
plot1.pixels = [1000, 1000]  
plot1.color\_by = ‘material’

plot2 = openmc.Plot()  
plot2.filename = ‘materials-xy’  
plot2.basis = ‘xy’  
plot2.origin = [0, 0, 0]  
plot2.width = [7.2135, 7.2135]  
plot2.pixels = [1000, 1000]  
plot2.color\_by = ‘material’

plot3 = openmc.Plot()  
plot3.filename = ‘materials-yz’  
plot3.basis = ‘yz’  
plot3.origin = [0, 0, 0]  
plot3.width = [7.2135, 360]  
plot3.pixels = [1000, 1000]  
plot3.color\_by = ‘material’

plot4 = openmc.Plot()  
plot4.type = ‘voxel’  
plot4.filename = ‘voxelPlot’  
plot4.origin = [0, 0, 0]  
plot4.width = [7.2135,7.2135,360]  
plot4.pixels = [500,500,500]  
plot4.overlap\_color = ‘blue’  
plot4.color\_by = ‘material’

# Show plot

plots = openmc.Plots(plots=[plot1, plot2, plot3, plot4])  
plots.export\_to\_xml()  
openmc.plot\_inline(plots=(plot1, plot2, plot3, plot4))  
#----------------------------------------------------------------------------#

the above is the plotting code and the ERRO IS :  
#---------------------------------------------------------------------#  
CalledProcessError Traceback (most recent call last)  
/tmp/ipykernel\_6375/1322277747.py in   
39 plots = openmc.Plots(plots=[plot1, plot2, plot3, plot4])  
40 plots.export\_to\_xml()  
—\> 41 openmc.plot\_inline(plots=(plot1, plot2, plot3, plot4))

~/anaconda3/envs/openmc-env/lib/python3.9/site-packages/openmc/executor.py in plot\_inline(plots, openmc\_exec, cwd, convert\_exec)  
103 ppm\_file = ‘plot\_{}.ppm’.format(p.id)  
104 png\_file = ppm\_file.replace(‘.ppm’, ‘.png’)  
 → 105 subprocess.check\_call([convert\_exec, ppm\_file, png\_file])  
106 images.append(Image(png\_file))  
107 display(\*images)

~/anaconda3/envs/openmc-env/lib/python3.9/subprocess.py in check\_call(\*popenargs, \*\*kwargs)  
371 if cmd is None:  
372 cmd = popenargs[0]  
 → 373 raise CalledProcessError(retcode, cmd)  
374 return 0  
375

CalledProcessError: Command ‘[‘convert’, ‘voxelPlot.ppm’, ‘voxelPlot.png’]’ returned non-zero exit status 1.  
#--------------------------------------------------------------------------------------------------------------#

thank you  
lz152

---

<div class="post-metadata">

### Author: ![lz152](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/lz152/32/1547_2.png) [@lz152](https://openmc.discourse.group/u/lz152)
#### Post date: [November 15, 2021, 2:31am UTC](https://openmc.discourse.group/t/calledprocesserror-command-convert-voxelplot-ppm-voxelplot-png-returned-non-zero-exit-status-1/1534/2 "2021-11-15T02:31:16Z")

</div>

I make it !!! “keep learning,keep stepping”  
thank you !!!  
lz152

---

<div class="post-metadata">

### Author: ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)
#### Post date: [November 19, 2021, 5:13am UTC](https://openmc.discourse.group/t/calledprocesserror-command-convert-voxelplot-ppm-voxelplot-png-returned-non-zero-exit-status-1/1534/3 "2021-11-19T05:13:23Z")

</div>

Just to follow up on this – the `plot_inline` function doesn’t work with voxel plots right now, so you’d have to process those separately. Glad you were able to get things working!

---

<div class="post-metadata">

### Author: ![lz152](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/lz152/32/1547_2.png) [@lz152](https://openmc.discourse.group/u/lz152)
#### Post date: [November 19, 2021, 1:28pm UTC](https://openmc.discourse.group/t/calledprocesserror-command-convert-voxelplot-ppm-voxelplot-png-returned-non-zero-exit-status-1/1534/4 "2021-11-19T13:28:37Z")

</div>

Thank you ! Paul,  
Glad to receive your reply ! I have made it !  
By using “openmc.plot\_geometry((plot0, plot1, plot2, plot3))” replaces the “plot\_inline” , and success !

lz152
