#783 Traceback (most recent call last): File "/Users/xmai/Desktop/pyvideotrans-main/videotrans/util/TestSrtTrans.py", line 17

*253.113* Posted at: 6 hours ago 👁12

Traceback (most recent call last):

File "/Users/xmai/Desktop/pyvideotrans-main/videotrans/util/TestSrtTrans.py", line 17, in run

text = translator.run(translate_type=self.translator_type,

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/xmai/Desktop/pyvideotrans-main/videotrans/translator/__init__.py", line 852, in run

from videotrans.translator._deepseek import DeepSeek

File "/Users/xmai/Desktop/pyvideotrans-main/videotrans/translator/_deepseek.py", line 11, in

from videotrans.configure._except import NO_RETRY_EXCEPT

File "/Users/xmai/Desktop/pyvideotrans-main/videotrans/configure/_except.py", line 5, in

from deepgram.clients.common.v1.errors import DeepgramApiError

ModuleNotFoundError: No module named 'deepgram.clients.common.v1.errors'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/Users/xmai/Desktop/pyvideotrans-main/videotrans/util/TestSrtTrans.py", line 25, in run

from videotrans.configure._except import get_msg_from_except

File "/Users/xmai/Desktop/pyvideotrans-main/videotrans/configure/_except.py", line 5, in

from deepgram.clients.common.v1.errors import DeepgramApiError

ModuleNotFoundError: No module named 'deepgram.clients.common.v1.errors'

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于 deepgram 模块版本不兼容导致的。错误信息显示无法找到 deepgram.clients.common.v1.errors 模块,这通常发生在使用较新版本的 deepgram 库时,而 pyVideoTrans 代码中引用的模块路径可能已过时。

解决方案:

1. 降级 deepgram 库版本

打开终端/命令提示符,执行以下命令安装兼容版本:

   pip install deepgram==3.2.7

或者

   pip install deepgram==3.2.6

2. 重新启动软件

安装完成后,重新启动 pyVideoTrans 软件即可。

问题分析:

这个错误发生在测试 DeepSeek 翻译功能时,软件尝试导入 deepgram 相关的错误处理模块,但由于 deepgram 库的 API 结构发生了变化,导致导入失败。降级到较旧的稳定版本可以解决这个兼容性问题。

如果问题仍然存在,建议检查您的 Python 环境是否干净,或者考虑重新安装最新版本的 pyVideoTrans

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