#3266 httpx.InvalidURL: Invalid port: '7890;https=127.0.0.1:7890;ftp=127.0.0.1:7890;socks=127.0.0.1:7890'

104.168* Posted at: 9 hours ago 👁10

网络连接失败:Traceback (most recent call last):
File "httpx\_urlparse.py", line 409, in normalize_port
ValueError: invalid literal for int() with base 10: '7890;https=127.0.0.1:7890;ftp=127.0.0.1:7890;socks=127.0.0.1:7890'

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\__init__.py", line 972, in run
File "videotrans\translator\_base.py", line 102, in run
File "videotrans\translator\_base.py", line 165, in _run_srt
File "videotrans\translator\_deepseek.py", line 50, in _item_task
File "openai\_client.py", line 166, in init
File "openai\_base_client.py", line 864, in init
File "openai\_base_client.py", line 794, in init
File "httpx\_client.py", line 686, in init
File "httpx\_client.py", line 244, in _get_proxy_map
File "httpx\_client.py", line 245, in
File "httpx\_config.py", line 210, in init
File "httpx\_urls.py", line 117, in init
File "httpx\_urlparse.py", line 321, in urlparse
File "httpx\_urlparse.py", line 411, in normalize_port
httpx.InvalidURL: Invalid port: '7890;https=127.0.0.1:7890;ftp=127.0.0.1:7890;socks=127.0.0.1:7890'


=
system:Windows-10-10.0.19045-SP0
version:v3.96
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.96-021

1 Replies

这是由于网络代理配置格式错误导致的。错误信息显示代理端口号被错误地设置为包含多个协议的复杂字符串,而非纯数字端口。

解决方案:

  1. 打开 pyVideoTrans 软件。
  2. 点击右上角的“设置”按钮(齿轮图标)。
  3. 在“网络代理”输入框中,将内容修改为正确的格式。

    • 正确格式示例http://127.0.0.1:7890socks5://127.0.0.1:7890
    • 错误格式示例7890;https=127.0.0.1:7890;ftp=127.0.0.1:7890;socks=127.0.0.1:7890
  4. 修改后,点击“保存”并重新测试翻译功能。

请查阅相关文档:

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.

Related resource