Exporting PNG from rhino

The problem is that you’re missing enclosing double-quotes around the command: file_path = " \"" + render_folder + file_name + ".png\""

If you want to use the ViewCapture class here is one sample: Issue Programmatically Saving "Raytraced" (Cycles) Renderings - #5 by nathanletwory . This particular script swaps out materials on selected objects and captures the view. If you have a Raytraced view (or other realtime render engine integration view) it’ll render for 10 passes.