#1273 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 38: invalid continuation byte

94.177* Posted at: 11 hours ago 👁14

Traceback (most recent call last):
File "videotrans\component\component.py", line 66, in dropEvent
File "codecs.py", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 38: invalid continuation byte


=
system:Windows-10-10.0.19045-SP0
version:v3.83
frozen:True
language:zh
root_dir:F:/Program Files/win-videotrans-v3.83

3 Replies

这个错误是由于拖拽到软件界面的文件路径包含非 UTF-8 编码字符导致的。根据错误信息,问题出现在 F:/Program Files/win-videotrans-v3.83 这个安装路径中。

解决方案:

  1. 重新安装软件到纯英文路径:

    • 将软件解压或安装到不包含中文、空格和特殊字符的路径下
    • 推荐路径示例:D:/videotransD:/pyvideotrans
  2. 立即操作步骤:

    • 关闭当前软件
    • 将整个软件文件夹移动到纯英文路径(如 D:/videotrans
    • 从新路径重新启动软件

重要提醒:

  • 确保新路径中不包含中文、空格和特殊符号
  • 避免使用 Program Files 这类系统目录,可能涉及权限问题
  • 建议使用简短的全英文路径,如 D:/videotrans

移动后再次尝试拖拽文件应该就能正常工作了。

配音阶段出错:(豆包语音合成模型2.0]文件或数据解码失败,编码格式错误:invalid continuation byte:
Traceback (most regent call last):
File videotrans\taskyjob.py, line 185, in run

这个错误是由于豆包语音合成在处理文本时遇到了编码问题,具体是 "invalid continuation byte" 表示文本编码格式错误。

解决方案:

  1. 检查源字幕文件编码

    • 如果使用了外部字幕文件,请确保文件编码为 UTF-8
    • 可以使用记事本或专业文本编辑器将文件另存为 UTF-8 编码格式
  2. 调整翻译设置

    • 在菜单栏选择 翻译设置
    • 尝试切换到其他翻译渠道(如 Google、Microsoft 等)
    • 确保翻译结果不包含特殊字符或乱码
  3. 修改高级选项

    • 在菜单栏选择 工具/选项 -> 高级选项
    • 在"翻译调整"区域,将"同时翻译的字幕数"设为 1
    • 取消勾选"发送完整字幕"
  4. 临时解决方案

    • 暂时切换到其他配音渠道,如 Edge-TTS 或 OpenAI TTS
    • 完成配音后再切换回豆包语音合成

如果问题持续存在,请提供 videotrans/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