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

'ImageDraw' object has no attribute 'textsize' #1

Open
RhodianSK opened this issue Oct 10, 2023 · 3 comments
Open

'ImageDraw' object has no attribute 'textsize' #1

RhodianSK opened this issue Oct 10, 2023 · 3 comments

Comments

@RhodianSK
Copy link

Hello,

When trying to use the custom node, I keep getting the above error.

Any suggestions?
2023-10-11_08-37-29

@aabreu
Copy link

aabreu commented Nov 13, 2023

Looks like textsize is deprecated in Pil

change the line 48:

from

text_width, text_height = draw.textsize(text, font=loaded_font)

to:

text_width = draw.textlength(text, font=loaded_font)

@IckeBins67
Copy link

Looks like textsize is deprecated in Pil

change the line 48:

from

text_width, text_height = draw.textsize(text, font=loaded_font)

to:

text_width = draw.textlength(text, font=loaded_font)

Working! Thank You!

@IARI
Copy link

IARI commented Feb 20, 2025

PR #5 appears to fix this issue. @mikkel could you merge it and re-release?

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

4 participants