amietn / vcsi

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

Error trying using diff font type #132

Open hunescoo opened 8 months ago

hunescoo commented 8 months ago

When i run this command vcsi --metadata-font test.ttf file_example_MP4_1920_18MG.mp4 I get this result, any tip?

Processing file_example_MP4_1920_18MG.mp4... Sampling... 16/16 Composing contact sheet... Traceback (most recent call last): File "/mnt/nvme21n1/user/virtualenv/bin/vcsi", line 8, in sys.exit(main()) ^^^^^^ File "/mnt/nvme21n1/user/virtualenv/lib/python3.11/site-packages/vcsi/vcsi.py", line 1647, in main process_file_or_ignore(filename, args) File "/mnt/nvme21n1/user/virtualenv/lib/python3.11/site-packages/vcsi/vcsi.py", line 1621, in process_file_or_ignore process_file(filepath, args) File "/mnt/nvme21n1/user/virtualenv/lib/python3.11/site-packages/vcsi/vcsi.py", line 1778, in process_file image = compose_contact_sheet(media_info, selected_frames, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/nvme21n1/user/virtualenv/lib/python3.11/site-packages/vcsi/vcsi.py", line 972, in compose_contact_sheet header_font = load_font(args, args.metadata_font, args.metadata_font_size, Config.metadata_font) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/nvme21n1/user/virtualenv/lib/python3.11/site-packages/vcsi/vcsi.py", line 952, in load_font return ImageFont.truetype(font_path, font_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/PIL/ImageFont.py", line 819, in truetype return freetype(font) ^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/PIL/ImageFont.py", line 816, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/PIL/ImageFont.py", line 215, in init if core.HAVE_RAQM: ^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/PIL/_util.py", line 24, in getattr raise self.ex File "/usr/lib/python3.11/site-packages/PIL/ImageFont.py", line 52, in from . import _imagingft as core ImportError: cannot import name '_imagingft' from 'PIL' (/usr/lib/python3.11/site-packages/PIL/init.py)

AKomyshan commented 8 months ago

This is not an error in VCSI itself. Have you read (https://github.com/python-pillow/Pillow/issues/4416) ? pip install --force-reinstall pillow helps

hunescoo commented 8 months ago

This is not an error in VCSI itself. Have you read (python-pillow/Pillow#4416) ? pip install --force-reinstall pillow helps

Thanks a lot, i will take a look <3

Works great. tks a lot ;)