Open hemna opened 3 years ago
Looks like this is related to the rendering overlay. There was a bug I fixed relating to this. See this zip link you can use to install and test via the plugin manager->Get More->From url... in OctoPrint settings(you should be able to re-render via the 'Failed Renderings' button on the tab after you install and reboot): https://github.com/FormerLurker/Octolapse/archive/8cae0c9d8f9b11d7a55c3d6fb04956931636429c.zip
Installed the zip and get the same exact error.
│2021-03-17 16:35:28,369 - octolapse.render - ERROR - Rendering Error │
│Traceback (most recent call last): │
│ File "/octoprint/plugins/lib/python3.8/site-packages/octoprint_octolapse/render.py", line 1720, in _render │
│ self._add_text_overlays() │
│ File "/octoprint/plugins/lib/python3.8/site-packages/octoprint_octolapse/render.py", line 2158, in _add_text_overlays │
│ img = self.add_overlay(img, │
│ File "/octoprint/plugins/lib/python3.8/site-packages/octoprint_octolapse/render.py", line 2213, in add_overlay │
│ font = ImageFont.truetype(font_path, size=font_size) │
│ File "/octoprint/plugins/lib/python3.8/site-packages/PIL/ImageFont.py", line 852, in truetype │
│ return freetype(font) │
│ File "/octoprint/plugins/lib/python3.8/site-packages/PIL/ImageFont.py", line 849, in freetype │
│ return FreeTypeFont(font, size, index, encoding, layout_engine) │
│ File "/octoprint/plugins/lib/python3.8/site-packages/PIL/ImageFont.py", line 173, in __init__ │
│ freetype_version = parse_version(features.version_module("freetype2")) │
│ File "/octoprint/plugins/lib/python3.8/site-packages/packaging/version.py", line 57, in parse │
│ return Version(version) │
│ File "/octoprint/plugins/lib/python3.8/site-packages/packaging/version.py", line 296, in __init__ │
│ match = self._regex.search(version) │
│TypeError: expected string or bytes-like object
root@5d919f81a973:/octoprint/plugins/lib/python3.8/site-packages/octoprint_octolapse# cat _version.py
# This file was generated by 'versioneer.py' (0.18) from
# revision-control system data, or from the parent directory name of an
# unpacked source archive. Distribution tarballs contain a pre-generated copy
# of this file.
import json
version_json = '''
{
"date": null,
"dirty": false,
"error": "no suitable tags",
"full-revisionid": "8cae0c9d8f9b11d7a55c3d6fb04956931636429c",
"version": "0+unknown"
}
''' # END VERSION_JSON
def get_versions():
return json.loads(version_json)
root@5d919f81a973:/octoprint/plugins/lib/python3.8/site-packages/PIL# pip freeze
awesome-slugify==1.6.5
backoff==1.10.0
backports.csv==1.0.7
Backup-Scheduler @ https://github.com/jneilliii/OctoPrint-BackupScheduler/archive/0.0.5.zip
bson==0.5.10
cachetools==4.2.1
colorzero==1.1
Creality-2x-temperature-reporting-fix @ file:///tmp/tmpuobx6e3i/OctoPrint-Creality2xTemperatureReportingFix-master.zip
DisplayLayerProgress @ file:///tmp/tmpz_yjpi7g/master.zip
docker==2.7.0
docker-pycreds==0.4.0
file-read-backwards==2.0.0
google-api-core==1.26.1
google-api-python-client==2.0.2
google-auth==1.27.1
google-auth-httplib2==0.1.0
googleapis-common-protos==1.53.0
httplib2==0.19.0
oauth2client==4.1.3
Octolapse @ file:///tmp/tmpj1q3ld1i.zip
OctoPrint-Anywhere @ file:///tmp/tmp7a3nlnrf/OctoPrint-Anywhere-master.zip
OctoPrint-CostEstimation @ file:///tmp/tmpf18djg8c/master.zip
OctoPrint-FilamentManager @ file:///tmp/tmpym3oqqpx/master.zip
OctoPrint-Slack @ file:///tmp/tmp418dl0qs/release.zip
OctoPrint-SnapStream @ file:///tmp/tmpnba9wvul/OctoPrint-SnapStream-master.zip
OctoPrint-SpoolManager @ file:///tmp/tmp4argp7fa/master.zip
OctoPrint-UltimakerFormatPackage @ file:///tmp/tmpfz4n6kto/OctoPrint-UltimakerFormatPackage-master.zip
OctoPrint-Youtube-Timelapse @ https://github.com/ryanfox1985/OctoPrint-Youtube-Timelapse/archive/0.1.8.zip
packaging==20.9
peewee==3.14.3
picamera==1.13
picamerab==1.13b1
Pillow==8.1.2
protobuf==3.15.5
pyasn1-modules==0.2.8
pyparsing==2.4.7
python-dateutil==2.8.1
qrcode==6.1
raven==6.10.0
SQLAlchemy==1.1.18
Themeify @ file:///tmp/tmp8maxny5u/OctoPrint-Themeify-master.zip
TheSpaghettiDetective @ https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/1.6.1.zip
uritemplate==3.0.1
uritools==2.1.1
YouTube-Live @ file:///tmp/tmp1ivluds7/OctoPrint-YouTubeLive-master.zip
I've narrowed it down to the call to features.version_module("freetype2") It's returning None, which causes parse_version to puke.
Ug.. this is some odd python version incompatibility within pillow that I've not seen before. You'll notice that the error is happening entirely within pillow itself:
File "/octoprint/plugins/lib/python3.8/site-packages/PIL/ImageFont.py", line 173, in __init__ │
│ freetype_version = parse_version(features.version_module("freetype2"))
Did you upgrade python somehow after Octolapse was installed?
Edit: not a python 2/3 thing after all!
Ok, I did a bit of research. I'm guessing you aren't using OctoPi, right? It could be that the libfreetype package isn't installed on your system, which means there is no text layout support. You install that package, remove pillow, then re-add pillow (make sure you use the correct virtual environment!) and see if that helps.
I am running everything inside a container on my rpi.
╰─ ○ cat docker-compose.yml
version: '3.2'
services:
octoprint:
image: octoprint/octoprint
restart: unless-stopped
privileged: true
ports:
- 80:80
- 8080:8080
devices:
- /dev/ttyACM0:/dev/ttyACM0
- /dev/video0:/dev/video0
volumes:
- /home/waboring/docker/octoprint/octoprint:/octoprint
# uncomment the lines below to ensure camera streaming is enabled when
# you add a video device
environment:
- ENABLE_MJPG_STREAMER=true
- MJPG_STREAMER_INPUT=-y -n -r 1280x720
I am running everything inside a container on my rpi.
Docker? I'm not as familiar with that as I should be. I should probably spend a couple days working with it.
I tried installing freetype-py and pillow to fix it, but it didn't.
You need to install libfreetype-dev via apt-get I believe.
I tried and that doesn't work :(
Hmmm. Maybe the kind people who developed pillow may have an idea. In any case, I will see what I can find.
Octolapse is able to take snapshots, but when it tries to render the timelapse it fails
The logfile shows
Octolapse 0.4.1
octoprint version Version 1.5.3
Octoprint system info