From d1d6e8e11cce73cc07f6f6f958f86e42f0796a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 29 May 2014 13:09:29 +0200 Subject: [PATCH] Filename might be None, do not try to pass that to os.path.basename. See #486 --- src/octoprint/printer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/printer.py b/src/octoprint/printer.py index b918b9be..7b897ee7 100644 --- a/src/octoprint/printer.py +++ b/src/octoprint/printer.py @@ -397,7 +397,7 @@ class Printer(): self._stateMonitor.setJobData({ "file": { - "name": os.path.basename(filename), + "name": os.path.basename(filename) if filename is not None else None, "origin": FileDestinations.SDCARD if sd else FileDestinations.LOCAL, "size": filesize, "date": date