mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 05:48:59 +08:00
Encode as UTF-8 before writing to gz
Turns out that gzip only accepts bytes as input, not str. Contributes to issue CURA-5097.
This commit is contained in:
parent
c1ea1320f0
commit
88912e3973
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user