Sometimes Cura will slice a model and have failed lines of code. After discovering this problem I have tried re-slicing and then the code will come out fine. The first picture below is the failure point in the code from the first time I ran Cura's slicing. The second picture is the exact same model that I ran a second time through Cura and it came out fine. Is there any settings/reasons as to why this is happening?

Note, that I am also using an Ender 3 v2. For the time being I suppose I will have to look at the full code ahead of time to spot failure points.

First Slicing of Model, which failed

2nd Slicing of Model, which was successful

  • $\begingroup$ Which version of Cura are you using? Is it the most recent? Have you tried slicing the same stl file with another slicer? What else have you tried? $\endgroup$
    – agarza
    Jan 27 at 14:06
  • 1
    $\begingroup$ Do you write directly to SD card? That looks like a writing error! $\endgroup$
    – 0scar
    Jan 27 at 18:43

1 Answer 1


The random appearance of the commands makes this appear as a writing error. I have had these happen in three cases:

  • When I sliced an object and then saved to the SD card but removed the card before saving finished, the resulting file was corrupt and at times wouldn't even print.
    • Solution: Wait for Cura to tell that saving finished, then use eject before removing the card.
  • When I sliced and saved, waited for completion, and yanked the card too quickly after that without using eject.
    • Solution: use the eject card button.
  • When I used an adapter with a bad fit or connection to the SD card.
    • Solution: reseat the SD card or use a different adapter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .