diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 67191a7af..a6dfc1e24 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -4078,7 +4078,7 @@ class PrintingGcodeFileInformation(PrintingFileInformation): """ PrintingFileInformation.start(self) with self._handle_mutex: - self._handle = bom_aware_open(self._filename, encoding="utf-8", errors="replace") + self._handle = bom_aware_open(self._filename, encoding="utf-8", errors="replace", newline="") self._pos = self._handle.tell() if self._handle.encoding.endswith("-sig"): # Apparently we found an utf-8 bom in the file.