python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
12.33k stars 2.24k forks source link

Improve ImageFont error messages #8338

Closed yngvem closed 2 months ago

yngvem commented 2 months ago

I spent a longer than I'd like to admit trying to figure out why my fonts wouldn't load before I realised that I was using the wrong function. This PR should hopefully help someone else realise their mistake faster.

Changes proposed in this pull request:

Documentation update: image and similar for truetype: image

radarhere commented 2 months ago

I've created https://github.com/yngvem/Pillow/pull/1 with some suggestions.

yngvem commented 2 months ago

I just merged the changes now

yngvem commented 2 months ago

I'm unsure why the pipeline crashed, but it seems to be unrelated to the changes in this PR? Maybe just unlucky with the load on the node that was assigned to this pipeline run?

Tests/test_file_tiff.py::TestFileTiff::test_timeout FAILED               [ 48%]

        if not self.map:
            # sort tiles in file order
>           self.tile.sort(key=_tilesort)
E           Failed: Timeout >6.0s

/vpy3/lib/python3.12/site-packages/PIL/ImageFile.py:245: Failed

https://github.com/python-pillow/Pillow/actions/runs/10656884196/job/29544000694?pr=8338

radarhere commented 2 months ago

I've created https://github.com/yngvem/Pillow/pull/2 with some suggestions.

yngvem commented 2 months ago

Good ideas for changes!

hugovk commented 2 months ago

Thank you!