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

Not working with Pillow v10 #29

Closed
piotr25691 opened this issue Jul 3, 2023 · 13 comments
Closed

Not working with Pillow v10 #29

piotr25691 opened this issue Jul 3, 2023 · 13 comments

Comments

@piotr25691
Copy link

The module is not working with Pillow v10 when trying to add text.

This is the error:

Traceback (most recent call last):

  File "/root/venv/lib/python3.11/site-packages/lightbulb/app.py", line 1162, in invoke_application_command
    await context.invoke()

  File "/root/venv/lib/python3.11/site-packages/lightbulb/context/base.py", line 334, in invoke
    await self.command.invoke(self)

  File "/root/venv/lib/python3.11/site-packages/lightbulb/commands/base.py", line 798, in invoke
    await self(context, **kwargs)

  File "/root/venv/lib/python3.11/site-packages/lightbulb/commands/base.py", line 712, in __call__
    return await self.callback(context, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/root/runner/public/iodine/cogs/leveling.py", line 463, in rank
    name(im, str(member))

  File "/root/runner/public/iodine/cogs/leveling.py", line 425, in name
    pilmoji.text(

  File "/root/venv/lib/python3.11/site-packages/pilmoji/core.py", line 296, in text
    width, _ = font.getsize(content)
               ^^^^^^^^^^^^

AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
@jay3332
Copy link
Owner

jay3332 commented Jul 3, 2023

Fixed in #21
Ignore this, I only skimmed over the error, sorry.

@jay3332 jay3332 closed this as completed Jul 3, 2023
@jay3332 jay3332 reopened this Jul 4, 2023
@annihilatorrrr
Copy link
Contributor

Fixed in #21 Ignore this, I only skimmed over the error, sorry.

Mind making a release if fixed ?

@jay3332
Copy link
Owner

jay3332 commented Jul 4, 2023

Fixed in #21 Ignore this, I only skimmed over the error, sorry.

Mind making a release if fixed ?

that would be very helpful, thank you!

@annihilatorrrr
Copy link
Contributor

annihilatorrrr commented Jul 4, 2023

Fixed in #21 Ignore this, I only skimmed over the error, sorry.

Mind making a release if fixed ?

that would be very helpful, thank you!

Sadly didn't worked :(

@jay3332
Copy link
Owner

jay3332 commented Jul 4, 2023

It seems like #21 did actually foz this problem, try installing from GitHub and see if the error goes away

@annihilatorrrr
Copy link
Contributor

annihilatorrrr commented Jul 5, 2023

yeah did that only.
File "C:\Users\kX\PycharmProjects\venv\Lib\site-packages\pilmoji\core.py", line 299, in text
width, _ = font.getsize(content)
^^^^^^^^^^^^
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

how can if PIL.version >= "9.2.0": this work ? string aff.

Fixed in #30 , please merge it.

@piotr25691
Copy link
Author

yeah did that only. File "C:\Users\kX\PycharmProjects\venv\Lib\site-packages\pilmoji\core.py", line 299, in text width, _ = font.getsize(content) ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

how can if PIL.version >= "9.2.0": this work ? string aff.

Fixed in #30 , please merge it.

Did you verify that your PR fixes issues with #21?

@annihilatorrrr
Copy link
Contributor

yeah did that only. File "C:\Users\kX\PycharmProjects\venv\Lib\site-packages\pilmoji\core.py", line 299, in text width, _ = font.getsize(content) ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
how can if PIL.version >= "9.2.0": this work ? string aff.
Fixed in #30 , please merge it.

Did you verify that your PR fixes issues with #21?

yes, i tested it, works fine :)

@piotr25691
Copy link
Author

yeah did that only. File "C:\Users\kX\PycharmProjects\venv\Lib\site-packages\pilmoji\core.py", line 299, in text width, _ = font.getsize(content) ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
how can if PIL.version >= "9.2.0": this work ? string aff.
Fixed in #30 , please merge it.

Did you verify that your PR fixes issues with #21?

yes, i tested it, works fine :)

Alright, let me test it using my project’s workflow

@annihilatorrrr
Copy link
Contributor

annihilatorrrr commented Jul 5, 2023

yeah did that only. File "C:\Users\kX\PycharmProjects\venv\Lib\site-packages\pilmoji\core.py", line 299, in text width, _ = font.getsize(content) ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
how can if PIL.version >= "9.2.0": this work ? string aff.
Fixed in #30 , please merge it.

Did you verify that your PR fixes issues with #21?

yes, i tested it, works fine :)

Alright, let me test it using my project’s workflow

yup!

@piotr25691
Copy link
Author

piotr25691 commented Jul 5, 2023

yeah did that only. File "C:\Users\kX\PycharmProjects\venv\Lib\site-packages\pilmoji\core.py", line 299, in text width, _ = font.getsize(content) ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
how can if PIL.version >= "9.2.0": this work ? string aff.
Fixed in #30 , please merge it.

Did you verify that your PR fixes issues with #21?

yes, i tested it, works fine :)

Alright, let me test it using my project’s workflow

yup!

works just fine, thanks!

maybe you can bump the packages's version to 2.1.0 since it fixed compatibility with Pillow 10

@annihilatorrrr
Copy link
Contributor

yeah did that only. File "C:\Users\kX\PycharmProjects\venv\Lib\site-packages\pilmoji\core.py", line 299, in text width, _ = font.getsize(content) ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
how can if PIL.version >= "9.2.0": this work ? string aff.
Fixed in #30 , please merge it.

Did you verify that your PR fixes issues with #21?

yes, i tested it, works fine :)

Alright, let me test it using my project’s workflow

yup!

works just fine, thanks!

maybe you can bump the packages's version to 2.1.0 since it fixed compatibility with Pillow 10

Dude, after merging #30 this will work aff :(

@jay3332
Copy link
Owner

jay3332 commented Jul 5, 2023

Since this was just a bug fix and no features or breaking changes were introduced, I made this a patch update @ pilmoji v2.0.3

@jay3332 jay3332 closed this as completed Jul 5, 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