FormerLurker / Octolapse

Stabilized timelapses for Octoprint
GNU Affero General Public License v3.0
638 stars 99 forks source link

No thumbnail available using external script camera. #849

Closed silentFred closed 2 years ago

silentFred commented 2 years ago

Mr Lurksies! Firstly thanks so much for your contribution. Amazing what you have built here! TLDR - camera taking pics, pics available in temp folder, printer is all good, no timelapse preview available.

Octolapse Version: 0.4.1 OctoPrint Version: 1.8.1

Diagnostic Logging was Enabled: _REPLACE_THISYES_OR_NO

What were you doing when the problem occurred

Using DSLR Camera with photo script in the octolapse logs i see the following python error and in Octoprint the preview thumbnail is not showing:

2022-06-18 21:04:29,821 - octolapse.snapshot - ERROR - An unexpected exception occurred while creating a snapshot thumbnail for the DSLR - Script camera. Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/snapshot.py", line 470, in create_thumbnail with Image.open(latest_snapshot_path) as img: File "/home/pi/oprint/lib/python3.7/site-packages/PIL/Image.py", line 3124, in open "cannot identify image file %r" % (filename if filename else fp) PIL.UnidentifiedImageError: cannot identify image file '/home/pi/.octoprint/data/octolapse/tmp/octolapse_snapshots_tmp/latest_6084c7d7-933e-4fe7-b87d-6713d8b6146d.jpeg'

What should have happened?

Should be showing a preview as the pics are taken.

What happened instead?

No preview

Operating System running OctoPrint and Octolapse

OS Name: Octopi Os Version: 0.18.0

Link to plugin_octolapse.log: (https://pastebin.com/MbyzyJEM)

Link to octoprint.log: (https://pastebin.com/4E6VJTvN)

silentFred commented 2 years ago

I solved my own issue here - camera was taking pics in raw instead of JPG. Could be an easy fix to surface this error to the UI with a hint?