foreachthing / Slic3rPostProcessing

Post-Processing Script to make the "Cura-Move" and add counter file prefix and much more...
GNU General Public License v3.0
5 stars 1 forks source link

Error code: 1 on export #4

Open MadTooler opened 6 months ago

MadTooler commented 6 months ago

I initially noted this here https://github.com/prusa3d/PrusaSlicer/issues/11043

I have been trying to use your PP to achieve the first layer for all then sequential without luck. The closest I get is to have it run on the output file, but with "Error code: 1" result during end of export.

I am running win10 64 with PS 2.7.4 and Python 3.12 64b

I have added the START_GCODE line and have my output set as: fullpath\python.exe fullpath\Slic3rPostProcessing-dev\main.py --iob --iobfl;

If I remove the --iob --iobfl it runs without error, but nothing is done. I also tried not including those and a dummy of --fl as a test and I did get any error from your script that it was not valid.

Any idea if I am doing something wrong or if the newer versions are keeping your PP from working?

Thanks

MadTooler commented 6 months ago

I found if I change my arguments to include iobh, then it does output with a different issue.

I used --iob --iobh=9999 --iobfl. It looks like I could have also changed the value in the spp_config.cfg file to 9999.0 and it works from there too. However, if I change it back to something smaller, it will not work again.

What I now see is the last item to be printed is not broken into a block with first layer included with the others. I can add and subtract items and it stays the same that the last is not included. I assume a counter may be off by 1, but I do not see it in the main.py just yet. I could do a work around by added an extra item then deleting it from the tail of the gcode.

Thanks again.

MadTooler commented 6 months ago

Looks like the first layer wipes are also not being moved to the first layer from the objects. This results in the wipe of the first layer being made to the first object in the correct place, but after all of the other first layers are performed. Then, the following wipes of the other objects are performed up in the air at the travel height from the last printed object.

foreachthing commented 6 months ago

I guess something in Prusa has changed meanwhile. I'll have a look as soon as I get some time. But, honestly, I don't use PrusaSlicer anymore and might try to fix it for OrcaSlicer.

I got frustrated that I never made any real progress and I am about to delete this project (dev branche) completly. Maybe someone (way smarter than I am) might pick it up where I left ...?

MadTooler commented 6 months ago

I think I recall, not sure, they changed some of the wipe outputs that could mess with how you were parsing.

I understand the frustration. Been there plenty of times myself. Other than getting bothered by guys like me, is there any downside to leaving the code available with a disclaimer you have abandoned it and it is as is? That maybe smarter, or more likely just a bit more specifically experienced, person will not be able to pick it up if it is deleted.

That said, I expect this functionality must someday be implemented by Prusa into their slicer. Especially the ability to have the first layer printed all across the plate before moving on to sequential printing. Running my MK3s I had 100% failure with PETG with the stock sequential method. When I manually altered my gcode to print the first before sequential, I had 100% success. Unless you are printing only PLA, seems their slicer is 100% failing with sequential since most filament run more reliable with varying heat settings during varying print stages. Kinda makes this a critical issue unless they plan to strip sequential printing.

Thanks for the work you shared!

foreachthing commented 6 months ago

Thanks for your comment! 😄 I should not delete it, but abandon it. You're right! Yeah, since I don't use this "feature" I never paid any more attention to it anymore and just let it rot... maybe you can use a modern chat-ai to help you with the issue 😉

TazBag commented 6 months ago

Hello, if this can help:

Historical changes and breaking backward compatibility Before version 2.4, PrusaSlicer used to execute the script on the final G-code exported to your desired target medium. Which was very often a removable drive, such as an SD card. SD cards are slow and wear out, so this was not ideal. There were also problems when sending the G-code to Octoprint. The new approach with the temporary file on your system drive prevents these problems and extends the functionality of post-processing scripts. However, it might break some of your existing scripts.

I have this error, when i try to use the script: Post-processing script C:\Users\Pino\AppData\Local\Programs\Python\Python311\python.exe C:\Users\Pino\AppData\Local\Programs\Python\Python311\Slic3rPostProcessor.py on file C:\Users\Pino\AppData\Local\Temp.8560.gcode.pp failed. Error code: 1

Maybe can be fixed fast and easy? :)

Ty for any help and for your work!

MadTooler commented 6 months ago

I have this error, when i try to use the script: Post-processing script C:\Users\Pino\AppData\Local\Programs\Python\Python311\python.exe C:\Users\Pino\AppData\Local\Programs\Python\Python311\Slic3rPostProcessor.py on file C:\Users\Pino\AppData\Local\Temp.8560.gcode.pp failed. Error code: 1

Maybe can be fixed fast and easy? :)

Ty for any help and for your work!

@TazBag your error code 1 is similar to what I was initially getting. Try including --iobh=9999 with your post script initialization string.

If you read this issue thread, you will understand that @foreachthing is no longer engaging this repo. While your notes of the post script execution could be useful, you probably are on your own here if you want to get this working better.