r/OpenPythonSCAD • u/WillAdams • Apr 04 '25
Did loading libraries change in the new version? (2025-04-02)
I think this happened in 2025-03-31 as well...
Trying to load:
from openscad import *
from gcodepreview import *
gc_file = "vcarvetest.nc"
gcp = gcodepreview(True, False, False)
gcp.previewgcodefile(gc_file)and am getting:
Running Python 3.11.5 in venv ''. ERROR: Traceback (most recent call last): File "<string>", line 3, in <module> ModuleNotFoundError: No module named 'gcodepreview'
Execution aborted
where File | Show Library Folder opens: C:\Users\willa\OneDrive\Documents\OpenSCAD\libraries
which contains:
"C:\Users\willa\OneDrive\Documents\OpenSCAD\libraries\gcodepreview.py" and "C:\Users\willa\OneDrive\Documents\OpenSCAD\libraries\gcodepreview.scad"
3
Upvotes
View all comments
Show parent comment
2
u/WillAdams Apr 04 '25
Is the OpenSCAD Library folder supposed to be in the sys.path?
For Windows you mean:
System Properties | Environment Variables | System Variables | Path
?
Added:
C:\Users\willa\OneDrive\Documents\OpenSCAD\libraries
there, and will reboot when I get a chance and see if that works.