Turns out that gzip only accepts bytes as input, not str. Contributes to issue CURA-5097.
@@ -36,6 +36,6 @@ class GCodeGzWriter(MeshWriter):
if not success: #Writing the g-code failed. Then I can also not write the gzipped g-code.
return False
- result = gzip.compress(gcode_textio.getvalue())
+ result = gzip.compress(gcode_textio.getvalue().encode("utf-8"))
stream.write(result)
return True