MatthiasLienhard / flowkey_dl

helper to create sheet music from flowkey songs
MIT License
70 stars 15 forks source link

Error #29

Closed OstinatoRigore closed 9 months ago

OstinatoRigore commented 11 months ago

Hi Matthias,

I'm getting the following error after running this from the command line flowkey-dl-cli https://cdn.flowkey.com/sheets/XXXX/300/0.png . -t testtitle -a testartist

_downloaded 36 patches form https://cdn.flowkey.com/sheets/XXXX/300/{}.png Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/bin/flowkey-dl-cli", line 8, in sys.exit(main()) ^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flowkey_dl/flowkey_dl_cli.py", line 32, in main processed_image = arange_image(image, title, artist) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flowkey_dl/flowkey_dl.py", line 110, in arangeimage w, h = d.textsize(title, font=fnt[0]) ^^^^^^^^^^ AttributeError: 'ImageDraw' object has no attribute 'textsize'

snowpirate commented 10 months ago

following

MatthiasLienhard commented 10 months ago

Seems to be an issue with Pillow >= 10.0.0: https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#font-size-and-offset-methods I will update this when I have time, in the meantime downgrading pillow to 9.5.0 should be a workaround.

MatthiasLienhard commented 9 months ago

This is fixed in 0.1.7 now. Pillow should work in the latest version again.