Skip to content
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

pelican-photos 1.5.0 is now broken #109

Closed
SirLaffalot opened this issue Nov 21, 2023 · 2 comments
Closed

pelican-photos 1.5.0 is now broken #109

SirLaffalot opened this issue Nov 21, 2023 · 2 comments
Milestone

Comments

@SirLaffalot
Copy link

Pillow deprecated "textsize" a few versions back and now throws an error.

Pillow 10.1.0 throws an error:
ERROR Could not process pages/page.md log.py:94
'ImageDraw' object has no attribute 'textsize'

Pillow now calls it "textlength"

I see it on line 1322...
text_size = draw_watermark.textsize(
self._pelican_settings["PHOTO_WATERMARK_TEXT"], font
)

Sorry, not confident enough to open a pull request. See also netbox-community/netbox-qrcode#48 Broke their code too.

@jpulliam
Copy link
Contributor

should be able to update to:
text_size[0] = draw_watermark.textlength(
self._pelican_settings["PHOTO_WATERMARK_TEXT"], font, direction="rtl"
)
text_size[1] = font.size

not sure if this fixes everything.I'll fiddle with it some more and open a pull request.

jpulliam added a commit to jpulliam/photos that referenced this issue Nov 21, 2023
phibos added a commit that referenced this issue Nov 30, 2023
@phibos phibos added this to the 1.6.0 milestone Nov 30, 2023
@phibos
Copy link
Collaborator

phibos commented Nov 30, 2023

Is fixed by #110 . Thanks for your work.

@phibos phibos closed this as completed Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants