Skip to content
Permalink
Browse files

Better error handling for capture issues during timelapsing

Should help debugging issue #425 and any future problems in that area.
  • Loading branch information...
foosel committed Apr 1, 2014
1 parent 8cc8e45 commit 1a7a468eb65fdf2a13b4c7a7723280e822c9c34b
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/octoprint/timelapse.py
@@ -236,10 +236,13 @@ def captureImage(self):
return filename

def _captureWorker(self, filename):
eventManager().fire(Events.CAPTURE_START, {"file": filename});
urllib.urlretrieve(self._snapshotUrl, filename)
self._logger.debug("Image %s captured from %s" % (filename, self._snapshotUrl))
eventManager().fire(Events.CAPTURE_DONE, {"file": filename});
eventManager().fire(Events.CAPTURE_START, {"file": filename})
try:
urllib.urlretrieve(self._snapshotUrl, filename)
self._logger.debug("Image %s captured from %s" % (filename, self._snapshotUrl))
except:
self._logger.exception("Could not capture image %s from %s" % (filename, self._snapshotUrl))
eventManager().fire(Events.CAPTURE_DONE, {"file": filename})

def _createMovie(self, success=True):
ffmpeg = settings().get(["webcam", "ffmpeg"])

0 comments on commit 1a7a468

Please sign in to comment.
You can’t perform that action at this time.