ome / omero-scripts

Core OMERO Scripts
https://pypi.org/project/omero-scripts/
12 stars 32 forks source link

AttributeError: 'FreeTypeFont' object has no attribute 'getsize' #215

Closed will-moore closed 5 months ago

will-moore commented 6 months ago

Reported at https://github.com/ome/omero-figure/issues/522

This is the same issue as found on OMERO.figure, where Pillow 10 has removed font.getsize() https://github.com/ome/omero-figure/pull/523

Running Split View Figure script fails with:

Traceback (most recent call last):
  File "./script", line 802, in <module>
    run_script()
  File "./script", line 790, in run_script
    [file_annotation, message] = split_view_figure(conn, script_params)
  File "./script", line 630, in split_view_figure
    fig = make_split_view_figure(
  File "./script", line 389, in make_split_view_figure
    text_height = font.getsize("Textq")[1]
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

cc @juliomateoslangerak

will-moore commented 6 months ago

Ah - this should be fixed at https://github.com/ome/omero-scripts/pull/214

imagesc-bot commented 5 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omere-figure-export-pdf-does-not-work/39573/32