amietn / vcsi

Create video contact sheets, thumbnails
MIT License
502 stars 57 forks source link

pillow 10.0.0 breaks things #119

Closed madnotangry closed 1 year ago

madnotangry commented 1 year ago

I've recently been getting this error on every invocation of VCSI

Sampling... 20/20
Composing contact sheet...
Traceback (most recent call last):
  File "/usr/bin/vcsi", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 1641, in main
    process_file_or_ignore(filename, args)
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 1615, in process_file_or_ignore
    process_file(filepath, args)
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 1772, in process_file
    image = compose_contact_sheet(media_info, selected_frames, args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 975, in compose_contact_sheet
    header_lines = prepare_metadata_text_lines(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 886, in prepare_metadata_text_lines
    max_metadata_line_length = max_line_length(
                               ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 855, in max_line_length
    text_width = 0 if len(text_chunk) == 0 else metadata_font.getsize(text_chunk)[0]
                                                ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

Similar errors in other, non-related packages are blaming the recent release of Pillow 10.0.0