Skip to content

Commit

Permalink
TypeError: cannot unpack non-iterable float object
Browse files Browse the repository at this point in the history
  • Loading branch information
buddhhu authored Aug 16, 2023
1 parent 875f0d2 commit 7fa6146
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/memify.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def draw_meme_text(image_path, msg):
current_h, pad = 10, 5
if upper_text:
for u_text in textwrap.wrap(upper_text, width=15):
u_width, u_height = draw.textlength(u_text, font=m_font)
u_width, u_height = m_font.getsize(u_text)
draw.text(
xy=(((i_width - u_width) / 2) - 1,
int((current_h / 640) * i_width)),
Expand Down Expand Up @@ -143,7 +143,7 @@ async def draw_meme_text(image_path, msg):
current_h += u_height + pad
if lower_text:
for l_text in textwrap.wrap(lower_text, width=15):
u_width, u_height = draw.textlength(l_text, font=m_font)
u_width, u_height = m_font.getsize(l_text)
draw.text(
xy=(
((i_width - u_width) / 2) - 1,
Expand Down Expand Up @@ -271,7 +271,7 @@ async def draw_meme(image_path, msg):
current_h, pad = 10, 5
if upper_text:
for u_text in textwrap.wrap(upper_text, width=15):
u_width, u_height = draw.textlength(u_text, font=m_font)
u_width, u_height = m_font.getsize(u_text)
draw.text(
xy=(((i_width - u_width) / 2) - 1,
int((current_h / 640) * i_width)),
Expand Down Expand Up @@ -309,7 +309,7 @@ async def draw_meme(image_path, msg):
current_h += u_height + pad
if lower_text:
for l_text in textwrap.wrap(lower_text, width=15):
u_width, u_height = draw.textlength(l_text, font=m_font)
u_width, u_height = m_font.getsize(l_text)
draw.text(
xy=(
((i_width - u_width) / 2) - 1,
Expand Down

0 comments on commit 7fa6146

Please sign in to comment.