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

ERROR: 'FreeTypeFont' object has no attribute 'getsize' #178

Open
Pierre-Gronau-ndaal opened this issue Aug 2, 2023 · 2 comments · May be fixed by #179
Open

ERROR: 'FreeTypeFont' object has no attribute 'getsize' #178

Pierre-Gronau-ndaal opened this issue Aug 2, 2023 · 2 comments · May be fixed by #179

Comments

@Pierre-Gronau-ndaal
Copy link

blockdiag sample.diag

ERROR: 'FreeTypeFont' object has no attribute 'getsize'

installed

freetype_py-2.4.0-py3-none-macosx_10_9_universal2.whl
Pillow==9.5.0 or Pillow==10.0.0

@ViktorHaag
Copy link

I see this problem when trying to use Pillow 10.0.0, but not with Pillow 9.5.0 (on MacOS). However, I'm using free type as installed via homebrew (installed version 2.13.1), so it's possible that this difference is meaningful?

(My environment: MacOS 13.5/Intel, Pillow 9.5.0, Sphinx 7.1.2, blockdiag 3.0.0, freetype 2.13.1 via homebrew)

@ViktorHaag
Copy link

See also: issue #176; perhaps we should close this one?

@tjni tjni linked a pull request Aug 5, 2023 that will close this issue
elisekain added a commit to memfault/interrupt that referenced this issue Aug 29, 2023
### Summary
When reading through some old Interrupt articles, I noticed a bunch of
block diagrams were not rendering.

For example, `blog/device-firmware-update-cookbook` would fail on
multiple diagrams with messages like:
```
Rendering Failed: blockdiag -T svg --nodoctype /tmp/input20230824-6359-57l5w2 -o /tmp/output20230824-6359-1mps6hh.svg: ERROR: 'ImageDraw' object has no attribute 'textsize'
```

And the output in the terminal was failing with ` Jekyll Diagrams:
Rendering Failed: blockdiag -T svg --nodoctype
/var/folders/dz/5g4qmn_56lvcrd_mkswhf2w80000gn/T/input20230828-86743-6tj8l6
-o
/var/folders/dz/5g4qmn_56lvcrd_mkswhf2w80000gn/T/output20230828-86743-uql6re.svg:
ERROR: 'FreeTypeFont' object has no attribute 'getsize' `

I found this issue on `blockdiag`'s GitHub page, indicating that the
package's dependency on Pillow needs to stay below 10.0.0:
blockdiag/blockdiag#178

This PR updates the `requirements.txt` file to force Pillow to stay at
`9.5.0`, which renders the diagrams.

#### Before
<img width="300" alt="CleanShot 2023-08-28 at 21 16 54@2x"
src="https://github.com/memfault/interrupt/assets/11810625/a971dc16-b529-458f-ab57-aeab8a783a1b">

#### After
<img width="300" alt="CleanShot 2023-08-28 at 21 21 43@2x"
src="https://github.com/memfault/interrupt/assets/11810625/8cf8e941-fbcd-4538-a493-4d4ef658c306">
kaechele added a commit to kaechele/bonaparte that referenced this issue Dec 29, 2023
blockdiag doesn't support Pillow 10
(blockdiag/blockdiag#178) and also seems to be
abandoned.

Pin Pillow to a version below 10 for now and possibly remove blockdiag
in the future.

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
openstack-mirroring pushed a commit to openstack/requirements that referenced this issue Jan 22, 2024
The latest blockdiag is not compatible with pillow 10.y.z[1].

The library looks unmaintained, so we may have to consider replacing
it, but let's downgrade pillow to fix broken nova doc builds.

[1] blockdiag/blockdiag#178

Change-Id: I58f0c06f122fd3b5ad349d1bdd25d5417dc0e39d
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Jan 22, 2024
* Update requirements from branch 'master'
  to 13f27bd15c478df868af6c67f67b1c4f3e782745
  - Downgrade pillow to 9.5.0
    
    The latest blockdiag is not compatible with pillow 10.y.z[1].
    
    The library looks unmaintained, so we may have to consider replacing
    it, but let's downgrade pillow to fix broken nova doc builds.
    
    [1] blockdiag/blockdiag#178
    
    Change-Id: I58f0c06f122fd3b5ad349d1bdd25d5417dc0e39d
tanaypf9 pushed a commit to tanaypf9/pf9-requirements that referenced this issue May 20, 2024
The latest blockdiag is not compatible with pillow 10.y.z[1].

The library looks unmaintained we may have to consider replacing it,
but in the mean time let's downgrade pillow to fix broken nova doc
builds.

[1] blockdiag/blockdiag#178

Change-Id: I58f0c06f122fd3b5ad349d1bdd25d5417dc0e39d
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

Successfully merging a pull request may close this issue.

2 participants