#813 API URL is http://127.0.0.1:9011 ERROR:api:Exception on /recogn [POST] Traceback (most recent call last): File "/Users

*242.29* Posted at: 19 hours ago 👁12

API URL is http://127.0.0.1:9011

ERROR:api:Exception on /recogn [POST]

Traceback (most recent call last):

File "/Users/xmai/pyvideotrans/xmai/lib/python3.10/site-packages/flask/app.py", line 1511, in wsgi_app

response = self.full_dispatch_request()

File "/Users/xmai/pyvideotrans/xmai/lib/python3.10/site-packages/flask/app.py", line 919, in full_dispatch_request

rv = self.handle_user_exception(e)

File "/Users/xmai/pyvideotrans/xmai/lib/python3.10/site-packages/flask/app.py", line 917, in full_dispatch_request

rv = self.dispatch_request()

File "/Users/xmai/pyvideotrans/xmai/lib/python3.10/site-packages/flask/app.py", line 902, in dispatch_request

return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) # type: ignore[no-any-return]

File "/Users/xmai/pyvideotrans/api.py", line 295, in recogn

trk = SpeechToText(cfg)

File "", line 16, in __init__

File "/Users/xmai/pyvideotrans/videotrans/task/_speech2text.py", line 26, in __post_init__

super().__post_init__()

File "/Users/xmai/pyvideotrans/videotrans/task/_base.py", line 48, in __post_init__

if "uuid" in self.cfg and self.cfg['uuid']:

TypeError: argument of type 'NoneType' is not iterable

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于 pyVideoTrans 软件在初始化语音识别任务时,配置文件 cfg 参数为 None 导致的类型错误。错误发生在尝试访问 cfg['uuid'] 时,因为 cfgNone 而不是字典。

解决方案:

1. 检查自定义语音识别API配置

  • 从错误信息中的 API URL http://127.0.0.1:9011 可以看出,您正在使用"自定义语音识别api"功能
  • 请确保您的自定义API服务已正确启动并运行在 127.0.0.1:9011 端口
  • 检查API服务是否按照 pyVideoTrans 的文档要求实现了正确的接口格式

2. 重新配置语音识别设置

  • 在软件界面中,进入"语音识别设置"菜单
  • 检查"自定义语音识别api"的配置是否正确
  • 如果问题持续,可以暂时切换到其他语音识别渠道(如 faster-whisper)进行测试

3. 查看详细日志

  • 请打开软件目录下的 logs 文件夹
  • 找到以当前日期命名的 .log 文件(如 20241219.log
  • 复制文件底部30-50行日志内容,这将有助于更准确地诊断问题

4. 重启软件

  • 关闭 pyVideoTrans 软件
  • 重新启动软件,这有时可以解决临时的配置问题

如果以上方法不能解决问题,建议查阅官方文档 pyvideotrans.com 中关于自定义API接口的详细说明,确保您的API服务符合软件的要求格式。

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