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

script stops working #123

Open
sega-gremlen opened this issue Jul 29, 2023 · 1 comment
Open

script stops working #123

sega-gremlen opened this issue Jul 29, 2023 · 1 comment

Comments

@sega-gremlen
Copy link

Hello it's working until python 3.11 update (only in my opinion) on my manjaro os

command that i use:
vcsi input.mp4 -g 3x5 --output otput.jpg

Traceback (most recent call last):
  File "/home/fila/.local/bin/vcsi", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/__init__.py", line 3, in main
    vcsi.vcsi.main()
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 1331, in main
    process_file(filename, args)
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 1389, in process_file
    image = compose_contact_sheet(media_info, selected_frames, args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 785, in compose_contact_sheet
    header_lines = prepare_metadata_text_lines(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 709, in prepare_metadata_text_lines
    max_metadata_line_length = max_line_length(
                               ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vcsi/vcsi.py", line 678, 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'

It happens in the end of composing
hashtag after text_width = 0 helps

@amietn
Copy link
Owner

amietn commented Jul 31, 2023

Hello @SirFilippov

I believe this was fixed in #119

I just created version 7.0.16 and published it to PyPi for convenience.
Please let me know if this is still a problem.

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

No branches or pull requests

2 participants