#1247 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 6892: invalid start byte

112.120* Posted at: 12 hours ago 👁7

Traceback (most recent call last):
File "videotrans\winform\fn_fanyisrt.py", line 153, in fanyi_start_fun
File "pathlib.py", line 1133, in read_text
File "codecs.py", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 6892: invalid start byte


=
system:Windows-10-10.0.19045-SP0
version:v3.82
frozen:True
language:zh
root_dir:G:/AI/win-videotrans-v3.82

1 Replies

这个错误是由于字幕文件(.srt)的编码格式不是 UTF-8,导致软件无法正确读取。请按以下步骤解决:

  1. 检查并转换字幕文件编码:

    • 使用文本编辑器(如 Notepad++、VS Code)打开您要翻译的 .srt 文件。
    • 在编辑器中查看并确认文件编码(通常在状态栏显示,如 ANSI、GBK 等)。
    • 将文件另存为 UTF-8 编码格式。
  2. 在软件中重新操作:

    • 使用转换后的 UTF-8 编码字幕文件重新进行批量翻译 SRT 字幕操作。

如果问题仍然存在,请提供完整的日志文件(位于 G:/AI/win-videotrans-v3.82/logs/ 目录下)以便进一步分析。

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions