#7785 [openrouter] Cannot connect to https://openrouter.ai/api/v1. Check network access or verify local server deployment.Conn

187.40**7 Posted at: 6 hours ago

[openrouter] Cannot connect to https://openrouter.ai/api/v1. Check network access or verify local server deployment.
Connection error.:Traceback (most recent call last):
File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions
File "httpx\_transports\default.py", line 250, in handle_request
File "httpcore\_sync\connection_pool.py", line 216, in handle_request
File "httpcore\_sync\connection_pool.py", line 196, in handle_request
File "httpcore\_sync\http_proxy.py", line 289, in handle_request
File "httpcore\_sync\connection.py", line 99, in handle_request
File "httpcore\_sync\connection.py", line 76, in handle_request
File "httpcore\_sync\connection.py", line 122, in _connect
File "httpcore\_backends\sync.py", line 205, in connect_tcp
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ConnectError: [WinError 10061] No connection could be made because the target machine active
......
ine 1014, in _send_single_request
File "httpx\_transports\default.py", line 249, in handle_request
File "contextlib.py", line 153, in exit
File "httpx\_transports\default.py", line 118, in map_httpcore_exceptions
httpx.ConnectError: [WinError 10061] No connection could be made because the target machine actively refused it

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

Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 98, in _item_task
File "videotrans\translator\_openaicompat.py", line 48, in _create_completion
File "openai\_utils\_utils.py", line 298, in wrapper
File "openai\resources\chat\completions\completions.py", line 1215, in create
File "openai\_base_client.py", line 1332, in post
File "openai\_base_client.py", line 1072, in request
openai.APIConnectionError: Connection error.

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

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 75, in run
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 155, in _run_srt
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\_openaicompat.py", line 105, in _item_task
videotrans.configure.excepts.StopTask: [openrouter] Cannot connect to https://openrouter.ai/api/v1. Check network access or verify local server deployment.
Connection error.


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:en_US
root_dir:E:/py video translator

1 Replies

#1 DeepSeek reply at 6 hours ago

The error WinError 10061 (connection actively refused) with the traceback showing httpcore\_sync\http_proxy.py indicates that the connection to https://openrouter.ai/api/v1 is being routed through a proxy that is not reachable or not running.

Two likely causes:

  1. A proxy address is filled in the network proxy box (on the Alignment row), but the proxy service isn't running or the port is wrong — so the request gets refused at the proxy stage.
  2. OpenRouter is an overseas API; without a working proxy, direct access from mainland China will fail.

Solutions (in order):

  1. OpenRouter is an overseas service — it requires a working proxy/VPN.

    Ensure your proxy tool is actually running before starting a task.
  2. Check the proxy field: On the main interface, in the Alignment row, look at the proxy textbox on the right.

    • If it contains an address (e.g.

      http://127.0.0.1:10808), the proxy service must be running on that exact port.

      Wrong port / stopped service → 10061.
    • If you don't need a proxy, clear the box completely and save, then retry.
    • Correct format: http://127.0.0.1:port or socks5://127.0.0.1:port.
  3. Note on root_dir: E:/py video translator: your software path contains a space.

    While this usually doesn't cause a network error, the docs strongly recommend a pure English/no-space path (e.g.

    E:\pyVideoTrans).

    Consider moving it if other issues appear.
  4. If your proxy works for browsing but not here, try switching proxy modes (HTTP vs SOCKS5) or a different port, then restart the software.

Please refer to the relevant docs:

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