#862 AttributeError: module 'videotrans.util.tools' has no attribute 'get_video_codec'

157.254* Posted at: 25 days ago 👁43

Traceback (most recent call last):

File "D:\tools\pyVideoTrans\pyvideotrans\videotrans\mainwin\_main_win.py", line 585, in is_writable

threading.Thread(target=tools.get_video_codec, args=(True,)).start()

File "D:\tools\pyVideoTrans\pyvideotrans\videotrans\util\tools.py", line 61, in __getattr__

raise AttributeError(f"module '{__name__}' has no attribute '{name}'")

AttributeError: module 'videotrans.util.tools' has no attribute 'get_video_codec'

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:False

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个错误是由于软件版本不匹配导致的。错误信息显示软件试图调用一个名为 get_video_codec 的函数,但在当前版本的 videotrans.util.tools 模块中找不到这个函数。

问题分析:

  • 错误发生在软件启动时检查视频编解码器的过程中
  • 您的系统信息:Windows 10,软件版本 v3.80,非冻结版本(源码运行)
  • 这通常发生在软件版本更新后,某些函数被重命名或移除

解决方案:

1. 更新到最新版本

请访问官方下载页面 https://pyvideotrans.com/downpackage 下载最新的 Windows 预打包版本 v3.81,这应该已经修复了此问题。

2. 如果您使用的是源码版本

  • 请确保从官方 GitHub 仓库 https://github.com/jianchang512/pyvideotrans 拉取最新代码
  • 重新安装所有依赖包
  • 确认使用的是最新的 v3.80 或更高版本

3. 清理缓存

在更新后,建议删除软件目录下的缓存文件和配置文件,然后重新启动软件。

这个错误不会影响软件的核心翻译功能,但可能会影响视频编解码器检测相关的功能。建议尽快更新到最新版本以获得最佳体验和稳定性。

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

Similar issues already exist

Trending Questions