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 07 '25 edited Apr 08 '25
That results in:
which seems right/like it would work...
and after quitting and re-launching and clearing out a bunch of files and so forth, it is working again.
I believe the problem was the file wasn't trusted --- I've been using:
"C:\Program Files\PythonSCAD\openscad.exe" --trust-python
as the target in the dock icon --- could that have stopped working?
Except now I'm getting:
when I have:
"C:\Users\willa\OneDrive\Desktop\vcarvetest.nc"
on the Desktop as well....
But, when I thought to change the line to:
it worked.
Did get one new message:
and will have to look into that later.