From 6d7f8a2a64b364504f11dafd5009a85fb785127a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 9 Apr 2018 15:56:35 +0200 Subject: [PATCH] Don't raise error when trying to read from finished print Could be caused by timing issues and one `continue_sending` too many, so just ignore this but log a warning. --- src/octoprint/util/comm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 3780dbf04..03d4c32c7 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -3547,7 +3547,8 @@ class PrintingGcodeFileInformation(PrintingFileInformation): """ with self._handle_mutex: if self._handle is None: - raise ValueError("File %s is not open for reading" % self._filename) + self._logger.warn(u"File {} is not open for reading".format(self._filename)) + return None, None, None try: offsets = self._offsets_callback() if self._offsets_callback is not None else None