Posts: 1
Joined: Mon Sep 25, 2023 2:20 pm

Post Processing Python Script Issues

Howdy y'all,

I have been working on a python script that translates gcode into a scripting language for a 6 axis robot. The script itself works perfectly from both inside the IDE and inside a command prompt. The script allows me to pass arguments to it in both of these places. Where I have been having trouble is from within the post processing section of Simplify3D. I have an arcwelding script right above this that works perfectly but the script I have written refuses to work.
Simplify3D troubleshooting.PNG
For reference, I am on V5.1.2. I have tried repackaging the script as an executable, rewriting how the input arguments are handled, passing the full file path rather than just the file name, running the script alone (without the first script above it), and many more troubleshooting methods.

From what I have seen, it looks like the script is failing to open successfully. This is once again strange since I can run the script flawlessly from within the command prompt and IDE. I cannot even run a "Hello World" script that I have written. My best guess now is maybe the script needs to open a console to successfully run the code? I wouldn't know how to test for that so now I am just lost.

Can anyone help me on my troubleshooting journey? Any help would be very much appreciated. I have included the code snippet below that handles the argument input:

def gcode_input():

global file_name
file_obj = ""

args = sys.argv
file_name = args[1]
file_obj = open(file_name + ".GCODE", 'r')
file_name = input("Enter G-Code file name-->")
file_obj = open(file_name + ".GCODE", 'r')

raw_gcode = []
for line in file_obj:

return raw_gcode
Posts: 1213
Joined: Sun May 31, 2015 6:01 am

Re: Post Processing Python Script Issues

There's another thread here that might be useful:

But in general, I would use something like:
C:\path\to\python.exe C:\path\to\

Use the full paths with .exe and .py extensions and it should work.
Posts: 44
Joined: Mon Jan 30, 2017 8:34 am

Re: Post Processing Python Script Issues

Here is one I made for the Diabase H-Series if it helps you.

You can find all of the project files here: ... sp=sharing
(99.13 KiB) Downloaded 17 times
H-Series Universal FFF Profile.fff
(32.18 KiB) Downloaded 13 times
(31.91 KiB) Downloaded 16 times

Return to “Troubleshooting and Bug Reports”