Skip to content
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

2.5.0 beta1 Post-Processor issue #8766

Closed
2 tasks done
m00nglum opened this issue Aug 26, 2022 · 16 comments
Closed
2 tasks done

2.5.0 beta1 Post-Processor issue #8766

m00nglum opened this issue Aug 26, 2022 · 16 comments

Comments

@m00nglum
Copy link

Description of the bug

I'm using Linux and just discovered ArcWelder. This is my first time using the post-processor option of Prusa Slicer. As instructed I put the full path to the ArcWelder executable in the post post-processing scripts section, like so:

/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. It is upon export that the error occurs.

When the export fails, the "Export GCode" button label turns to "Invalid Data" and is unusable. I have to restart prusa sclicer to clear it.

Screenshot_20220826_073620
Screenshot_20220826_073646
.
Thank you.

Project file & How to reproduce

diameter_test.3mf.zip

I cannot export it... that is the problem, but attached is the 3mf. It would not allow me to upload a 3mf here (bug report system). I likewise could not zip the file, because it looks like it already uses a zip algorithm. When trying to do so, it says "nothing to do!". So I renamed the file. Just rename it back to 3mf (remove the zip extension).

This problem happens, however, no matter what I'm slicing. this just happens to be what I was doing.

It is worth mentioning that I'm using the AppImage version of 2.5.0 beta1

After renaming it, just open the attached 3mf in PS, then slice it and try to export it, you will see what i mean. I have the latest version of arcwelder, and like I said above, it works fine from the command line as the same user that is running prusaslicer. I don't think this has anything to do with arcwelder... I think it is probably a minor bug in the post-processor -- probably a space missed separating what should be script arguments from the full name of the path... something like that... so PS is trying to execute "/opt/aw/bin/ArcWelderPipedInFileFromPS outfile.gcode" instead of "/opt/aw/bin/ArcWelder PipedInFileFrom PS outfile.gcode" That's my guess anyway (but what do I know).

Thanks.

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

2.5.0 Beta1

Operating system

Ubuntu Linux - latest

Printer model

mk3s +, no mmu

@foreachthing
Copy link

foreachthing commented Aug 27, 2022

In your 3mf, there is no post-processing entry?
This is my line, in PS (2.5.0-rc1), of post-processing:
"c:\dev\ArcWelderLib\x64\Release\ArcWelder.exe" -y -t=0.02 ;
PS then adds the name of the gcode file at the end of that line. That works very well on my computer ...

If you need an output.gcode, then you'd have to use a script in between to switch parameters around.
Check ArcWelder --help for valid parameters.

To get rid of "Invalid Data" I just check/uncheck the BRIM checkbox - annoying as hell, I know.

@m00nglum
Copy link
Author

m00nglum commented Aug 27, 2022 via email

@Jan-Soustruznik
Copy link
Collaborator

Hello, @m00nglum,

Could you check the PATH? Try use ~/opt/aw/bin/ArcWelder

@m00nglum
Copy link
Author

That would set it to my home directory... it is not in my home directory... it is straight under /opt

@m00nglum
Copy link
Author

@foreachthing,

I cannot help but notice that your command isn't using arguments either. You have two switches that have nothing to do with positional parameters (which input and output are for the ArcWelder command).. and of course, you are using windows. It is possible that this problem doesn't manifest in Windows at all, it may just be in the Linux version.

The other thing is that I do have the brim box unchecked... but it still happens.

There is still something broken here, and I seriously doubt it has anything to do with ArcWelder. I'd be willing to try a simple script, if someone has one I can use, just to demonstrate that ArcWelder is not the culprit here.

@Jan-Soustruznik
Copy link
Collaborator

Hello, @m00nglum,

I think that the problem will be caused by the incorrect PATH, missing permission, etc ... I already checked with my Ubuntu and latest PrusaSlicer on board - all works fine on my side.

@foreachthing
Copy link

foreachthing commented Aug 29, 2022

@foreachthing,

I cannot help but notice that your command isn't using arguments either. You have two switches that have nothing to do with positional parameters (which input and output are for the ArcWelder command)..

Yes, input output are the same in my case.
After arcwelder, there comes my post processing script (a second post processing). So, I need the input gcode to be the one from PS.

If you need input output to be diffetent, you'll need a script in between to switch the positional arguments around.

@m00nglum
Copy link
Author

@Jan-Soustruznik

It isn't. Like I said, I can do this from the command line as my unprivileged user, and it works just fine (same user I run PrusaSlicer with)... and I'm using the beta, not the latest. I run it with the full path: /opt/aw/bin/ArcWelder -- no problems. It is only in Prusa Slicer that it doesn't work. It is not an ArcWelder issue. If your is working, what do you have in the post-processing text box? Where is your ArcWelder executable located? Under your home dir?

@foreachthing
The thing about that is that it violates everything I've seen and read about Arcwelder. The syntax is ArcWelder {input} {output}. Everyone is pretty unanimous: all you do is put in the full path to the ArcWelder command, and Prusa Slicer knows what to do. In your example, you are not using another script. You are using two switches for ArcWelder: "-y -t=0.02". I do not see you calling any other script. Where is your second script configured?

@m00nglum
Copy link
Author

I should probably also mention... I have tried this with other executables as well, like /usr/bin/xterm and /usr/bin/kwrite -- it does not matter what I put in the post processing text box -- it gives me the same error. I even tried just "echo". I've also tried this on 2.4.2 and the same thing happens. I only see one of two possilities here... a bug in the PS code, or I'm missing a package that PrusaSlicer is counting on... but I have no idea what that would be, if the latter was the case...

@Jan-Soustruznik
Copy link
Collaborator

@Jan-Soustruznik

It isn't. Like I said, I can do this from the command line as my unprivileged user, and it works just fine (same user I run PrusaSlicer with)... and I'm using the beta, not the latest. I run it with the full path: /opt/aw/bin/ArcWelder -- no problems. It is only in Prusa Slicer that it doesn't work. It is not an ArcWelder issue. If your is working, what do you have in the post-processing text box? Where is your ArcWelder executable located? Under your home dir?

@m00nglum
If your is working, what do you have in the post-processing text
/home/JS/Prusa/ArcWelder/bin/ArcWelder
Where is your ArcWelder executable located? Under your home dir?
yes, home dir

(I also checked with 2.5.0 Beta1 - also works without problem)

@m00nglum
Copy link
Author

@Jan-Soustruznik
Well then, I can only conclude that there is some dependency missing on my system that the AppImage relies on... because I just tried doing the same, and it still happens.

I'm going to go out on a limb here, and guess that you are using Gnome, Cinnamon, or some other GTK desktop system, am I correct? I'm using KDE, so it is possible that this was packaged on a system with GTK libraries, and I'm missing one of them. I'm using KDE Neon, which is just Ubuntu with the latest KDE offerings. Can you confirm this please? Thanks.

@jfbauer432
Copy link

I think the fix is to change the default value for SHELL to "/bin/sh" instead of "sh"

if (shell == nullptr) { shell = "sh"; }
It looks like that function that runs the child process does not do path lookups.

You can reproduce the issue just by using /bin/true as the post-processing script and setting the SHELL environment variable to "sh" vs "/bin/sh".

@m00nglum
Copy link
Author

I worked around this issue by creating a startup script for PrusaSlicer that exports that environment variable. Thanks to Jbauer for tipping me off to this issue. I couldn't have guessed that was the issue.

@m00nglum m00nglum reopened this Aug 29, 2022
@bubnikv
Copy link
Collaborator

bubnikv commented Aug 30, 2022 via email

lukasmatena added a commit that referenced this issue Aug 30, 2022
@lukasmatena
Copy link
Collaborator

The issue should be fixed by 87a5116 in 2.5.0-rc2 (which will be released later today). @m00nglum , we will be glad if you retested it. @jfbauer432 , thanks for pointing the problem out. Closing.

@m00nglum
Copy link
Author

m00nglum commented Aug 30, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants