Skip to content

Commit 599e466

Browse files
committed
Fix UnicodeEncodeError when counting bytes in G-code files. Now using UTF-8 instead of ASCII. Closes #12.
1 parent 0da4a19 commit 599e466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bricklayers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ def process_gcode(self, gcode_stream):
15031503
# Process the G-code
15041504
#READING ONE LINE AT A TIME FROM A GENERATOR (the input)
15051505
for line_number, line in enumerate(gcode_stream, start=1):
1506-
bytes_received += len(line.encode("ascii"))
1506+
bytes_received += len(line.encode("utf-8"))
15071507

15081508

15091509
#

0 commit comments

Comments
 (0)