Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example does not run #1

Open
alexbirkett opened this issue May 30, 2019 · 8 comments
Open

Example does not run #1

alexbirkett opened this issue May 30, 2019 · 8 comments

Comments

@alexbirkett
Copy link

alexbirkett commented May 30, 2019

I can't run the example on macOS Mojave Version 10.14.5:

Alexs-MacBook-Pro-2124:keygen alex$ bin/keygen.py scad/kwikset.scad --bitting 25536 -o housekey.stl
Traceback (most recent call last):
  File "bin/keygen.py", line 36, in <module>
    r = subprocess.call([scad, args.filename, "-o", args.output] + opts + remaining)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'openscad': 'openscad'
@alexbirkett
Copy link
Author

Running export SCAD=/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD prior to bin/keygen.py scad/kwikset.scad --bitting 25536 -o housekey.stl fixes the error above but then I get

Alexs-MacBook-Pro-2124:keygen alex$ bin/keygen.py scad/kwikset.scad --bitting 25536 -o housekey.stl
WARNING: Can't open include file 'kwikset.gen.scad'.
WARNING: Ignoring unknown variable 'outline_points', in file kwikset.scad, line 16.
WARNING: Ignoring unknown variable 'outline_paths', in file kwikset.scad, line 16.
WARNING: Ignoring unknown variable 'outline_points', in file kwikset.scad, line 17.
WARNING: Ignoring unknown variable 'outline_points', in file kwikset.scad, line 17.
WARNING: Ignoring unknown variable 'engrave_points', in file kwikset.scad, line 18.
WARNING: Ignoring unknown variable 'engrave_paths', in file kwikset.scad, line 19.
WARNING: Ignoring unknown variable 'warding_kw1_points', in file kwikset.scad, line 21.
WARNING: min() parameter could not be converted, in file keygen.scad, line 81
WARNING: min() parameter could not be converted, in file keygen.scad, line 81
WARNING: max() parameter could not be converted, in file keygen.scad, line 82
WARNING: max() parameter could not be converted, in file keygen.scad, line 82
WARNING: abs() parameter could not be converted, in file keygen.scad, line 98
WARNING: abs() parameter could not be converted, in file keygen.scad, line 99
WARNING: Unable to convert square(size=[36, undef], ...) parameter to a number or a vec2 of numbers, in file keygen.scad, line 50
WARNING: Unable to convert square(size=[36, undef], ...) parameter to a number or a vec2 of numbers, in file keygen.scad, line 50
WARNING: Unable to convert translate([undef, 0, 0]) parameter to a vec3 or vec2 of numbers, in file keygen.scad, line 61
WARNING: Unable to convert translate([undef, 0, 0]) parameter to a vec3 or vec2 of numbers, in file keygen.scad, line 61
WARNING: Scaling a 2D object with 0 - removing object
Current top level object is empty.

@ervanalb
Copy link
Owner

It looks like your OpenSCAD isn't finding the included file kwikset.gen.scad.

According to this page on OpenSCAD's wiki,

Library files are searched for in the same folder as the design was open from

but your OpenSCAD doesn't seem to be searching there.

It might be searching the current working directory. Try this:

cd scad
../bin/keygen.py kwikset.scad --bitting 25536 -o housekey.stl

What version of OpenSCAD do you have?

@ervanalb
Copy link
Owner

Did you get this running? I would like to close this issue.

@tvirelli
Copy link

tvirelli commented Sep 3, 2019

I am having the same issue on Mac. I was getting the same error above of:

Traceback (most recent call last):
  File "bin/keygen.py", line 36, in <module>
    r = subprocess.call([scad, args.filename, "-o", args.output] + opts + remaining)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'openscad': 'openscad'

I then tried export SCAD=/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD as @alexbirkett suggested and got the same type of errors:

WARNING: Can't open include file 'kwikset.gen.scad'.
WARNING: Ignoring unknown variable 'outline_points'.
WARNING: Ignoring unknown variable 'outline_paths'.
WARNING: Ignoring unknown variable 'outline_points'.
WARNING: Ignoring unknown variable 'outline_points'.
WARNING: Ignoring unknown variable 'engrave_points'.
WARNING: Ignoring unknown variable 'engrave_paths'.
WARNING: Ignoring unknown variable 'warding_kw1_points'.
Current top level object is empty.

I also tried starting in the scad directory as you suggested but the same errors above persisted.

@ukd1
Copy link

ukd1 commented Oct 20, 2019

for me, there is no kwikset.gen.scad file - I'm getting the same errors as above on Mac with OpenSCAD 2019.05.

@ukd1
Copy link

ukd1 commented Oct 25, 2019

FYI, I got this working by checking out a really old release. The kwikset.gen.scad was in the repo.

@ervanalb-vs
Copy link

I have added the .gen.scad files to the repo. They can be re-generated by running make, but this requires Inkscape to be installed.

@ukd1
Copy link

ukd1 commented Oct 28, 2019

Thanks @ervanalb-vs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants