diff --git a/octoprint/printer.py b/octoprint/printer.py index 3f64d56..c7d182e 100644 --- a/octoprint/printer.py +++ b/octoprint/printer.py @@ -410,7 +410,10 @@ class Printer(): if self._sdPrinting: newLine = None (filePos, fileSize) = self._comm.getSdProgress() - newProgress = float(filePos) / float(fileSize) + if fileSize > 0: + newProgress = float(filePos) / float(fileSize) + else: + newProgress = 0.0 else: newLine = self._comm.getPrintPos() newProgress = float(newLine) / float(len(self._gcodeList))