Skip to content

Commit 2275d22

Browse files
committed
1.0.8
fix support for elegoo thumbnail output, #129
1 parent cd52394 commit 2275d22

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

octoprint_prusaslicerthumbnails/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ def _extract_thumbnail(self, gcode_filename, thumbnail_filename):
8282
use_flashprint = False
8383
use_creality = False
8484
use_buddy = False
85-
with open(gcode_filename, "rb") as gcode_file:
85+
86+
with open(gcode_filename, "r", encoding="utf8", errors="ignore") as gcode_file:
8687
for line in gcode_file:
8788
lineNum += 1
88-
line = line.decode("utf-8", "ignore")
8989
gcode = octoprint.util.comm.gcode_command_for_cmd(line)
9090
extrusion_match = octoprint.util.comm.regexes_parameters["floatE"].search(line)
9191
if gcode == "G1" and extrusion_match:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
plugin_name = "Slicer Thumbnails"
1515

1616
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
17-
plugin_version = "1.0.7"
17+
plugin_version = "1.0.8"
1818

1919
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
2020
# module

0 commit comments

Comments
 (0)