Skip to content

Pillow-based drawing broken with Python 3.11 #39

@marph91

Description

@marph91

Traceback:

Traceback (most recent call last):
  File "...", line 19, in <module>
    image = context.render_pillow(800, 500)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/martin/anaconda/envs/py311/lib/python3.11/site-packages/staticmaps/context.py", line 153, in render_pillow
    renderer.render_attribution(self._tile_provider.attribution())
  File "/home/martin/anaconda/envs/py311/lib/python3.11/site-packages/staticmaps/pillow_renderer.py", line 100, in render_attribution
    _, th = self.draw().textsize(attribution)
            ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ImageDraw' object has no attribute 'textsize'

Background: textsize was removed. See https://stackoverflow.com/a/77074371/7410886.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions