-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timelapse previews not generated with Pillow 10.0.0 #917
Comments
Encountered this as well, and was able to fix this by updating snapshot.py, replacing Ref: |
confirmed the above change works. |
Hi, Yours |
Same issue here, but i don't know how to make this change, any short tutorial? |
I found it while searching for something else. You need to edit a file on your Octoprint system. |
Thought i need to change the name in snapshot.py itself, but wasn't able to find it, also on octopi.txt i wasnt able to find anything, there are just some settings for the webcam Octopi.txt |
I need to have a look, but at the moment I'm in hospital so, that isn't that easy. |
Fairly easy fix. If you open the octolapse log file you will see exactly where the error is located. Here is what I did.
you should see something like this:
Next edit the file shown in the error. Should be the line number shown above.
As mentioned above: `Rename the Image.ANTIALIAS file to Image.Resampling.LANCZOS'. |
Thanks for that one, will try it out.
Doesn't sound that good, get well soon :) |
I've submitted a Pull Request to update this directly in the plugin. When testing with my local machine everything works great now. |
I tried the less ~/.octoprint/logs/plugin_octolapse.log but didn't have any errors. So I guess mine isn't the same issue. What I'm seeing is my timelapse preview is of something I printed before the last update. It won't change. Although the plugin seems to be working after the last update. Thoughts? Ricky |
Can u upload the octolapse log? Also i did this "fix" today & the preview is now working👍🏼 |
Mine doesn't seem to be the same issue, it just doesn't update the preview. The image is from the last print before I updated octolapse to the latest version I've uninstalled octolapse and will attempt reinstalling it. |
Could be still the same issue, that log is pretty clean, did you log everything/errors? And start a print with it? |
This seems like a different issue than #917, I'd suggest a new issue to keep things clean. |
I can confirm now, that my issue was the same others on this thread and the renaming the Image.ANTIALIAS to Image.Resampling.LANCZOS did the trick, but mine was a tad different (and I am total n00b in Linux) Oh and vi is the DEVIL I typed in the less ~/.octoprint/logs/plugin_octolapse.log and got a similar message as the above post at line 485, but my location of the snapshot.py was different so I had to type the stuff below to find it vi /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_octolapse/snapshot.py Then the arrow keys and such don't work the same in vi (because it's the DEVIL) So I actually edited it in nano like this nano /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_octolapse/snapshot.py Thanks! |
Glad you were able to find and fix the issue!
lol... First time using it is definitely an awakening. The nice thing about vi is that it's always there. And, if you use it daily you get used to it very fast. |
Just to update, according to google From Google Bard - No, Image.Resampling.LANCZOS and Image.LANCZOS are not the same. Image.Resampling.LANCZOS was introduced in Pillow 9.0.0 as a new way to specify resampling filters, while Image.LANCZOS was the original way to specify the Lanczos resampling filter. However, Image.Resampling.LANCZOS was deprecated in Pillow 10.0.0, and Image.LANCZOS is now the recommended way to specify the Lanczos resampling filter |
This fixed the issue for me as well. Will this be implemented in the next release by chance? |
Going to try to get this added today. I think there is a PR I need to merge. |
awesome saw the change in the release this issue can be resolved. |
Thanks for responding @idaband! @CodedSakura or anyone else, can you verify the issue is resolved after updating to the latest release? |
can confirm, the issue is fixed in the latest release! |
Hi,
Printing does not start unless you turn off Octolapse. As I see it happens in gcode files that have tumbnails. OctoPi new camera stack 1.0.0 |
Version of Octolapse
Octolapse Version: 0.4.3
Version of OctoPrint
OctoPrint Version: 1.9.1
When you ran into the problem, did you have diagnostic logging enabled?
Diagnostic Logging was Enabled: yes
What were you doing when the problem occurred
What should have happened?
Timelapse preview should display the last snapshot
What happened instead?
Timelapse preview says "No snapshots have been taken...", but the Sanpshot Count displays a non-zero number.
The timelapse also renders succesfully after print finishes.
Self diagnosis of the problem
Looking at the plugin_oclolapse.log file, at line 2202 it is visible that Octolapse failed to generate a thumbnail
from the snapshot. This seems to be caused by PIL, as the error says
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
.Python version: 3.9.2
Pillow version: 10.0.0
PIL.Image.ANTIALIAS
was incidentally removed in Pillow 10.0.0, but was already deprecated for a while.This issue repeats for each time Octolapse tries to generate a preview. (L2202, L3560, L4898, L6198, L7480)
Operating System running OctoPrint and Octolapse
OS Name: OctoPi
Os Version: 1.0.0
Printer model & used firmware incl. version
Printer Model: Not needed, internal python problem
Printer Firmware Version: Not needed, internal python problem
Browser and version of browser, operating system running browser
Browser: Not needed, internal python problem
Browser OS: Not needed, internal python problem
Link to the gcode file you were printing when the problem occurred
Link to Gcode File: Not needed, internal python problem
Link to settings.json
Link to settings.json with all passwords removed: Not needed, internal python problem
Link to plugin_octolapse.log
Link to plugin_octolapse.log: https://gist.github.com/CodedSakura/a89dc65a8812503ded1f6fdcca5c2314
Link to octoprint.log
Link to octoprint.log: https://gist.github.com/CodedSakura/0ffe7486151dbe59dc29534f4054deaa
Link to contents of Javascript console in the browser
Link to javascript console output: Not needed, internal python problem
Screenshots and/or videos of the problem:
Screenshot/Video Links:
Please consider becoming a patron
If you like this project, please support my work by becoming a patron, and consider adding a 'star' to the repository. It takes a lot of time and effort to maintain the project and respond to issues. The cost of test prints, software, cameras, printer parts, etc. can quickly add up, so every bit helps.
You can find various videos and tutorials by subscribing to my Youtube channel. You can also follow me on Twitter.
The text was updated successfully, but these errors were encountered: