Skip to content

Issues when spaces in path #83

@Daafip

Description

@Daafip

Im currently still using SolidPython v1 and was looking at migrating.

When I run: model.save_as_stl()
I get the error:

CalledProcessError: Command '['openscad', '-o', 'solid_out.stl', 'd:/work/3D', 'printen/solid_python2/test/solid_out.stl.scad']' returned non-zero exit status 1.

This is due to the space in my filepath 'd:/work/3D printen/solid_python2/test/solid_out.stl.scad'

When i run it manually with the space parsed properly this does work:

import subprocess
subprocess.check_call(['openscad', '-o', 'solid_out.stl', 'd:/work/3D printen/solid_python2/kruiden_houder_custom/solid_out.stl.scad'])

(returns 0 and creates the file)

The issue is likely in:

cmd = config.openscad_stl_command.format(scadfile=scad_file, stlfile=filename)
import shlex
import subprocess
subprocess.check_call(shlex.split(cmd),
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL)

Are you open to PR's?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions