The file name is Chinese. I encountered an error.
See original GitHub issueIt’s great. it allows me to sort out my videos faster. I love it. But I have a problem. when the file name is in Chinese, it doesn’t work. When I renamed him English, it worked again.
amy@AMYS-MBP ~ vcsi 你好_世界.mp4 \
-t \
-w 850 \
-g 3x5 \
--end-delay-percent 20 \
-o output.png
Processing 你好_世界.mp4...
Sampling... 15/15
Composing contact sheet...
Traceback (most recent call last):
File "/usr/local/bin/vcsi", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/vcsi/__init__.py", line 3, in main
vcsi.vcsi.main()
File "/usr/local/lib/python3.7/site-packages/vcsi/vcsi.py", line 1451, in main
process_file(filename, args)
File "/usr/local/lib/python3.7/site-packages/vcsi/vcsi.py", line 1532, in process_file
image = compose_contact_sheet(media_info, selected_frames, args)
File "/usr/local/lib/python3.7/site-packages/vcsi/vcsi.py", line 862, in compose_contact_sheet
template_path=args.metadata_template_path)
File "/usr/local/lib/python3.7/site-packages/vcsi/vcsi.py", line 785, in prepare_metadata_text_lines
text=remaining_chars)
File "/usr/local/lib/python3.7/site-packages/vcsi/vcsi.py", line 749, in max_line_length
text_width = 0 if len(text_chunk) == 0 else metadata_font.getsize(text_chunk)[0]
File "/usr/local/lib/python3.7/site-packages/PIL/ImageFont.py", line 112, in getsize
return self.font.getsize(text)
UnicodeEncodeError: 'latin-1' codec can't encode character '\u4f60' in position 0: ordinal not in range(256)
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Chinese characters file and folder names cannot be ...
The issue is with displaying MS office file names in Chinese (and folder names too) when I search for files using File Explorer, ......
Read more >can not load resources with file name containing Chinese ...
I recently set up a new CKAN instance (package install) for the community and found when I uploaded a file with a file...
Read more >KB45114: File name with more than 11 Chinese characters ...
When a report with more than 11 Chinese characters in name is exported to PDF, the file name is truncated to 11 characters,...
Read more >Problem opening PDF file in Chinese file name?
Error I am getting is : There was an error opening this document. The filename, directory name, or volume label syntax is incorrect."...
Read more >Unable to load Chinese file name as attachment
Hi All, We would like to seek your advice for the issue we encountered. We are not able to upload chinese file name...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, I believe this happens because the default system font does not support unicode characters. Let’s see if this theory is correct.
Can you try running
vcsi
with a TTF font that supports unicode and let me know if that changes anything? For example:Should be fixed in https://github.com/amietn/vcsi/commit/1a3457b947073285a0b07d0a1d2a356303da943c