#6946 代理设置不正确或代理不可用,请检查代理或关闭代理并删掉代理文本框中所填内容:Traceback (most recent call last): File

171.91**9 Posted at: 1 hour ago

代理设置不正确或代理不可用,请检查代理或关闭代理并删掉代理文本框中所填内容:Traceback (most recent call last):
File "urllib3\connection.py", line 198, in _new_conn
File "urllib3\util\connection.py", line 60, in create_connection
File "socket.py", line 967, in getaddrinfo
socket.gaierror: [Errno 11001] getaddrinfo failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "urllib3\connectionpool.py", line 773, in urlopen
File "urllib3\connectionpool.py", line 1042, in _prepare_proxy
File "urllib3\connection.py", line 753, in connect
File "urllib3\connection.py", line 205, in _new_conn
urllib3.exceptions.NameResolutionError: : Failed to resolve 'fa8697046430176fdbcac7ef1770c221' ([Errno 11001] getaddrinfo failed)

The above exception was the direct cause of the following exception:

urllib3.exceptions.ProxyError: ('Unable to connect to proxy', NameResolutionError(": Failed to resolve 'fa8697046430176fdbcac7ef1770c221' ([Errno 11001] get
......
retries exceeded with url: /niutransserver/translation/?target_language=en&source_language=zh&text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B&secret=fa8697046430176fdbcac7ef1770c221 (Caused by ProxyError('Unable to connect to proxy', NameResolutionError(": Failed to resolve 'fa8697046430176fdbcac7ef1770c221' ([Errno 11001] getaddrinfo failed)")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 67, in run
File "videotrans\translator\_base.py", line 68, in run
File "videotrans\translator\_base.py", line 107, in _run_text
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_transapi.py", line 31, in _item_task
File "requests\api.py", line 73, in get
File "requests\api.py", line 59, in request
File "requests\sessions.py", line 589, in request
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 671, in send
requests.exceptions.ProxyError: HTTPSConnectionPool(host='api.niutrans.com', port=443): Max retries exceeded with url: /niutransserver/translation/?target_language=en&source_language=zh&text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B&secret=fa8697046430176fdbcac7ef1770c221 (Caused by ProxyError('Unable to connect to proxy', NameResolutionError(": Failed to resolve 'fa8697046430176fdbcac7ef1770c221' ([Errno 11001] getaddrinfo failed)")))


=
system:Windows-10-10.0.19045-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v4.11

3 Replies

#1 DeepSeek reply at 1 hour ago

这是代理设置错误导致的。

从日志看,软件在调用小牛翻译(api.niutrans.com)时,尝试通过一个无效的代理地址 fa8697046430176fdbcac7ef1770c221 连接,该地址实际是您的密钥/串,被误填到了代理文本框中,因此无法解析并连接。

解决方法:

  1. 在主界面找到「对齐控制(Alignment)」行右侧的网络代理文本框
  2. 清空该文本框内的所有内容,然后保存。
  3. 小牛翻译是国内 API,无需代理,清空后即可正常使用。

如果清空后仍报错,请检查 菜单 → 设置 中是否还有全局代理配置,一并清空即可。

请查阅相关文档:

#2 171.91**9 reply at 1 hour ago

小牛翻译的API 密匙我有,但是这个API网站 是什么?

#3 DeepSeek reply at 1 hour ago

小牛翻译(Niutrans)是一个第三方在线翻译服务,API接口地址就是日志中显示的 api.niutrans.com,其官方网站是 https://www.niutrans.com。您需要在该网站注册并获取 secret(API密钥),然后填入软件对应的翻译渠道配置中。

根据您的日志,软件已经成功找到了您的密钥(secret=fa8697046430176fdbcac7ef1770c221),但请求时因为代理填写错误而失败。请先按上一步清空主界面“对齐控制”行右侧的代理文本框,再确认翻译渠道选择的是“小牛翻译”,并在对应设置中填入正确的密钥即可。小牛翻译是国内服务,不需要填写任何代理

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource