Repository: lllyasviel/Fooocus

Issue #1147: urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party..
Created: 2023-12-03T12:46:07Z
Hello Guys.
This is the error I'm getting when I am trying to use the image prompt issue
urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
Total time: 21.12 seconds
Do you happen to know what could be the problem?
thanks in advance!

Duplicate issue #2874: [Bug]: timeouterror
Created: 2024-05-06T02:02:46Z
Checklist

 The issue has not been resolved by following the troubleshooting guide
 The issue exists on a clean installation of Fooocus
 The issue exists in the current version of Fooocus
 The issue has not been reported before recently
 The issue has been reported before but has not been fixed yet

What happened?
TimeoutError
Steps to reproduce the problem
click run.bat and so on
What should have happened?
socket  open error
What browsers do you use to access Fooocus?
No response
Where are you running Fooocus?
None
What operating system are you using?
No response
Console logs
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 1447, in connect
  File "http\client.py", line 941, in connect
  File "socket.py", line 845, in create_connection
  File "socket.py", line 833, in create_connection
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Fooocus\Fooocus\entry_with_update.py", line 46, in <module>
    from launch import *
  File "D:\Fooocus\Fooocus\launch.py", line 132, in <module>
    config.default_base_model_name, config.checkpoint_downloads = download_models(
  File "D:\Fooocus\Fooocus\launch.py", line 123, in download_models
    load_file_from_url(url=url, model_dir=config.paths_checkpoints[0], file_name=file_name)
  File "D:\Fooocus\Fooocus\modules\model_loader.py", line 25, in load_file_from_url
    download_url_to_file(url, cached_file, progress=progress)
  File "D:\Fooocus\python_embeded\lib\site-packages\torch\hub.py", line 620, in download_url_to_file
    u = urlopen(req)
  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: <urlopen error [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试 失败。>
Additional information
No response

Closing comment (2024-05-06T17:16:40Z): Duplicate of #1147.
You can find other similar issues in https://github.com/lllyasviel/Fooocus/issues?q=is%3Aissue+urllib.error.URLError+is%3Aclosed.
From your language settings i assume that you're in China. What helped in the past:

do not use a VPN or proxy
make sure you can manually download files from https://huggingface.co/lllyasviel/misc/tree/main / https://huggingface.co/lllyasviel/fav_models/tree/main/fav
use HuggingFace mirror: #2637

Please provide more information, e.g. browser, OS, full console log, etc. next time.
Hope this helps!