Post-Processing Script for ArcWelder
 
Notifications
Clear all

Post-Processing Script for ArcWelder  

  RSS
moonglum
(@moonglum)
Trusted Member
Post-Processing Script for ArcWelder

Hi.  I'm trying to put a post processing script in my Output Options. 

I'm using Linux.  The video I watched, of course, was using Windows... though in this case it seems it should not make a difference.  Anyway, they instructed that all that is needed is to put the full path to the ArcWelder executable in the post post-processing scripts section.  I did this:

/opt/aw/bin/ArcWelder

The script is executable, and I have permissions to it.  My user can run arcwelder against a gocode file on the command line with no issues.  But, when I try to use it as a post-processor I get this error:

execve failed: No such file or directory

This happens upon clicking "Export Gcode".  The actual slice seems to be performed without any issue.  I'm not sure when it tries to apply the post-script, but I assume it is upon export.

The video specifically stated no arguments are needed, but now I wonder... If some arguments are needed, what would they be?  The syntax of ArcWelder is very simple: ArcWelder {input file} {output file}... but I don't know what variables PrusaSlicer would understand.

Thank you for your help.

Best Answer by JimB:

Ah, now I see the cause.  export SHELL=/bin/sh works, but export SHELL=sh (which is the default) does not.  It needs the path to the shell.

This topic was modified 2 years ago 3 times by moonglum
Posted : 19/08/2022 2:39 pm
JimB
 JimB
(@jimb)
Estimable Member
RE: Post-Processing Script for ArcWelder

Is that the full error you are seeing?  I am assuming it is in a prusa-slicer popup window.  I tried to reproduce this and didn't get the same result (using 2.4.2).

If the post processing script does not exist, the error was "No such file or directory"; if it exists but was not executable, "Permission denied".  Otherwise it seemed to work.

Prusa-slicer  automatically adds the temporary gcode filename as the only argument

Posted : 19/08/2022 6:31 pm
karl-herbert
(@karl-herbert)
Illustrious Member
RE:

what does your command line look like in Prusaslicer?

Arcwelder on a Windows system works with the following command line:

"C:\Program Files\Prusa3D\ArcWelder\Windows\bin\ArcWelder.exe";

wbr,

Karl

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.

Posted : 19/08/2022 7:11 pm
moonglum
(@moonglum)
Trusted Member
Topic starter answered:
RE:

 

Posted by: @jimb

Is that the full error you are seeing?  I am assuming it is in a prusa-slicer popup window.  I tried to reproduce this and didn't get the same result (using 2.4.2).

If the post processing script does not exist, the error was "No such file or directory"; if it exists but was not executable, "Permission denied".  Otherwise it seemed to work.

Prusa-slicer  automatically adds the temporary gcode filename as the only argument

 

Yes.  That is the full error and it is coming from prusa slicer.  The other interesting thing is that the "Export Gcode" button label turns from "Export Gcode" to "Invalid Data", and it won't do anything anymore during that session (have to restart prusa slicer to get it back to normal).

 

Posted by: @karl-herbert

what does your command line look like in Prusaslicer?

Arcwelder on a Windows system works with the following command line:

"C:\Program Files\Prusa3D\ArcWelder\Windows\bin\ArcWelder.exe";

wbr,

Karl

 

Karl, as I sated, the command line is:

/opt/aw/bin/ArcWelder

And it works outside prusa slicer with no issues.  I'm using the 2.5.0 beta1 of PrusaSlicer, so it could be an issue that was introduced in the beta.  I just wanted to make sure I was using it right... and it really seems like I am.  I thought other people would have bumped into this... but it looks like that is not the case... I'll have to see where I can file a bug report or give feedback on the beta.

 

Thanks.

 

-Chris

 

This post was modified 2 years ago by moonglum
Posted : 26/08/2022 11:44 am
moonglum
(@moonglum)
Trusted Member
Topic starter answered:
RE: Post-Processing Script for ArcWelder

Pic of the Export GCode button...

Posted : 26/08/2022 11:45 am
JimB
 JimB
(@jimb)
Estimable Member
RE: Post-Processing Script for ArcWelder

I saw the "Invalid Data" as well when trying to reproduce this.  I got it to go away, by changing a setting or moving the object.

Have you tried this with an older (non-beta) version?  To submit a bug report go to https://github.com/prusa3d/PrusaSlicer/issues

 

Posted : 26/08/2022 12:40 pm
moonglum
(@moonglum)
Trusted Member
Topic starter answered:
RE: Post-Processing Script for ArcWelder

Hey Jim,

Thanks. I did get in to git hub and find that area.  I'm filling out the bug report now.  No, I didn't try it in previous versions, because I didn't really have a need for it before.  I really want arachne, so I switched to this beta, then learned about ArcWelder.  It is pretty amazing, and a great add-on to an already stellar slicer.  It isn't a major deal, but I thought they should be aware of it.  It does look like a programming error.  My guess is it has to do with the arguments it is passing.  It is probably not including a space or something silly like that, and appending the argument to the file name so it is saying "file not found".  I'm sure whatever it is, it is probably an easy fix for the developer.  Probably just a minor oversight.

Anyway, my chance to contribute 😀

Thanks.

Posted : 26/08/2022 2:18 pm
JimB
 JimB
(@jimb)
Estimable Member
RE: Post-Processing Script for ArcWelder

I took a quick look at the code and the function that runs the post-processing script has not changed in a long time (early 2019).

It does run the command you specify via what is in the SHELL environment variable (or "sh" if not set).  Can you print out the SHELL environment variable?  i.e. echo $SHELL

Also try to reproduce the issue with some debugging turned on.

prusa-slicer --loglevel 4 > /tmp/ps-log

Do your export with the post processing script set, exit prusa-slicer, then run

grep Executing /tmp/ps-log

And post the output of that grep command.  That should tell us what it is really trying to run.

Posted : 26/08/2022 3:58 pm
moonglum
(@moonglum)
Trusted Member
Topic starter answered:
RE:

As you requested, here is the grep output:

[2022-08-29 11:27:16.204528] [0x00007f1f59ffb700] [info]    Executing script /opt/aw/bin/ArcWelder on file /tmp/.604060.gcode.pp
[2022-08-29 11:27:16.204554] [0x00007f1f59ffb700] [debug]   Executing script, shell: sh, command: /opt/aw/bin/ArcWelder '/tmp/.604060.gcode.pp'

Looking through the log file, I also noticed this:

[2022-08-29 11:27:16.185734] [0x00007f1f59ffb700] [debug]   boost::filesystem::permisions before copy error message (this could be irrelevant message based on file system): No such file or directory

I don't know if that is significant or not.  Since I have now tired this on a previous version of PS, and I have tried other executables in place of ArcWelder (and get the same results), I'm now wondering if I am missing a library or something.  It doesn't seem to be related to ArcWelder at all.

I'm using KDE Neon... which is an Ubuntu core with the latest KDE offerings... so if there is a GTK component or something that PS relies upon, perhaps I don't have it?

Anyway, thanks for your help.  Curious as to what your thoughts are on this....

 

Oh, an btw, my $SHELL variable is empty, so I can see it defaulting to 'sh' in the log file...

This post was modified 2 years ago by moonglum
Posted : 29/08/2022 3:41 pm
moonglum
(@moonglum)
Trusted Member
Topic starter answered:
RE: Post-Processing Script for ArcWelder

Holy cow...

That is the problem!

if I do:

export SHELL=/bin/bash /opt/PrusaSlicer

it works!

KDE NEON has a symlink for /bin/sh that goes to /bin/dash instead of /bin/bash.

This appears to make PrusaSlicer unhappy. So, I will edit my profile to set the default SHELL variable to /bin/bash... that should work.

Thanks Jim!

Posted : 29/08/2022 3:53 pm
JimB
 JimB
(@jimb)
Estimable Member
RE: Post-Processing Script for ArcWelder

Ah, now I see the cause.  export SHELL=/bin/sh works, but export SHELL=sh (which is the default) does not.  It needs the path to the shell.

Posted : 29/08/2022 4:51 pm
JimB
 JimB
(@jimb)
Estimable Member
RE: Post-Processing Script for ArcWelder

I added the "sh" vs "/bin/sh" info to the github issue.

 

Posted : 29/08/2022 5:06 pm
moonglum
(@moonglum)
Trusted Member
Topic starter answered:
RE:

I got around the issue by creating a small script to start prusaslicer with an export of that environment variable.  Now it seems to work.  Thank you.

 

 

This post was modified 2 years ago by moonglum
Posted : 29/08/2022 5:49 pm
Dio CIRSTEA
(@dio-cirstea)
Member
RE: Post-Processing Script for ArcWelder

I had the same problem after Export Prusa program said the file in Arc Welder did not exist.

I've changed the names to folders as in the example of "moonglum" - /opt/aw/bin/ArcWelder   but it still didn't work

The Arc Welder files I had on disk E:\Prusa Profile\opt\aw\bin\ArcWelder.exe

After changing the name of the main folder and deleting space E:\PrusaProfile\opt\aw\bin\ArcWelder.exe

I copied the change to the Output option  looks like this E:\PrusaProfile\opt\aw\bin\ArcWelder.exe;

Then before slicing, I Run the ArcStraightener.exe and ArcWelder.exe files.  (Windows version)

The export went smoothly and the printing came out flawlessly.P.S. check that you don't have folders with spaces between names, and don't forget to run the .exe files

 

Posted : 23/11/2023 7:32 pm
Share: