#1916 urllib.error.URLError: <urlopen error [Errno 2] No such file or directory>

38.54* Posted at: 4 hours ago 👁8

Traceback (most recent call last):
File "urllib\request.py", line 1348, in do_open
File "http\client.py", line 1282, in request
File "http\client.py", line 1328, in _send_request
File "http\client.py", line 1277, in endheaders
File "http\client.py", line 1037, in _send_output
File "http\client.py", line 975, in send
File "http\client.py", line 1454, in connect
File "ssl.py", line 512, in wrap_socket
File "ssl.py", line 1070, in _create
File "ssl.py", line 1341, in do_handshake
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\_overall.py", line 44, in run
File "whisper\__init__.py", line 137, in load_model
File "whisper\__init__.py", line 73, in _download
File "urllib\request.py", line 216, in urlopen
File "urllib\request.py", line 519, in open
File "urllib\request.py", line 536, in _open
File "urllib\request.py", line 496, in _call_chain
File "urllib\request.py", line 1391, in https_open
File "urllib\request.py", line 1351, in do_open
urllib.error.URLError:


=
system:Windows-10-10.0.22631-SP0
version:v3.86
frozen:True
language:zh
root_dir:D:/AAA Pyvideo/win-pyvideotrans-v3.86

1 Replies

这个错误表明软件在尝试下载 Whisper 语音识别模型时,无法连接到 Hugging Face 服务器。错误根源是网络连接问题,可能是由于代理设置不正确或网络环境限制。

请按以下步骤解决:

  1. 手动下载模型(推荐方案)

    • 访问 Hugging Face 模型库:https://huggingface.co/guillaumekln/faster-whisper-{model_name}/tree/main。将 {model_name} 替换为您需要的模型,例如 large-v3
    • 下载 config.jsonmodel.bintokenizer.json 这三个核心文件。
    • 在您的软件根目录(D:/AAA Pyvideo/win-pyvideotrans-v3.86)下,找到 models 文件夹。
    • models 文件夹内,创建一个以模型名称命名的子文件夹(例如 large-v3),将下载的三个文件放入其中。
    • 重启软件,选择该模型即可。
  2. 检查并配置网络代理

    • 如果您身处中国大陆,使用代理是访问 Hugging Face 的必要条件。
    • 在软件主界面第5行的“网络代理”处,填入您的代理地址,格式如:http://127.0.0.1:10809socks5://127.0.0.1:10808
    • 确保您的代理软件已开启并允许 pyvideotrans 访问网络。
  3. 切换备用识别模型

    • 如果上述方法不便操作,可以暂时使用其他不需要从 Hugging Face 下载的识别模型。
    • 在语音识别(第2行)的下拉菜单中,选择 “阿里FunASR(本地)”“openai-whisper(本地)”(如果已提前下载好模型)。

完成模型手动放置或代理设置后,问题应得到解决。

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