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
1
u/gadget3D Apr 08 '25
I think ultimately everythig works as expected.
vcarvetest.nc could not be opened because without path pythonscad wants to open it from the PythonSCAD program folder.
output() is now deprecated, use show() instread
Finally I am happy, that you are running on a working pythonscad again