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
Post Process scripts fails when run from PrusaSlicer #4644
Comments
You should be able to use your python script directly in a console. Example: Also, read this (if you haven't already): https://manual.slic3r.org/advanced/post-processing |
I had tested my code exactly as your example shows, and it worked (I even got Windows to allow executing the script and calling Python automatically without the 'python' at the beginning). The issue was that I did not realize on Windows the path to the python executable should have spaces prepended with "!" instead of simply enclosing the whole path in quotes (as is done usually) - this is in the Slic3r manual, in the link above. I have now tested through PrusaSlicer and it simply worked. Thank you for the assistance. |
Can you elaborate on how this problem was fixed? I am getting the same error. Where do I change things and what do I add? Thanks! |
In short I used full path to the python executable (in my case it is a v3.8.X, which is located at "C:\Python38\python.exe") followed by a space and then the full path to the post processor script (note that if this path contains any spaces, you should enclose it with double quotes). Therefore my full line for the post-processor script is:
This worked for me. |
Version
PrusaSlicer version 2.2.0
Operating system type + version
Windows 10 build 1909
Behavior
I created a post process script (both in perl and python, after I got the issue), which simply replace T- commands for use on my single extruder machines. Both the Perl and Python scripts work when I call them in cmd, powershell and git-bash, with the form: " " (no need for me to even prepend for example "py").
However when I run it from PrusaSlicer, the python get error: Failed starting the script \duet-toolchange-strip.py \dual-test8.gcode, Win32 error: 193
The Perl I get error: Post processing script \duet-toolchange-strip.pl on file \dual-test8.gcode failed. Error code: 25
I have attempted to fix both of the issues, spending many hours, but is unable to.
My Python script is as follows:
and my Perl is as follows:
I only have a 64bit python installed, also perl is 64bit.
While creating this, I used Slic3r scripts as a start, but even those scripts don't work.
I am thinking the issue might be exactly how the child process is created (in current master src/libslic3r/gcode/postprocessor.cpp on line 164). How can I simulate this in any of my terminals/shells to ensure it works?
The text was updated successfully, but these errors were encountered: