Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run demo error:requests.exceptions.ReadTimeout #150

Open
zuixiaosanlang opened this issue Feb 7, 2025 · 0 comments
Open

run demo error:requests.exceptions.ReadTimeout #150

zuixiaosanlang opened this issue Feb 7, 2025 · 0 comments

Comments

@zuixiaosanlang
Copy link

ubuntu20.04运行python demo/app_januspro.py报错:
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.0.17', port=1082): Read timed out. (read timeout=3)

模型已下载,路径正确

报错细节:
(deepseek_python311_torch26) yajiang@yajiang:~/jyd/Janus$ python demo/app_januspro.py
Python version is above 3.10, patching the collections module.
/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/transformers/models/auto/image_processing_auto.py:590: FutureWarning: The image_processor_class argument is deprecated and will be removed in v4.42. Please use slow_image_processor_class, or fast_image_processor_class instead
warnings.warn(
Loading checkpoint shards: 100%|██████████████| 2/2 [03:50<00:00, 115.06s/it]
Using a slow image processor as use_fast is unset and a slow processor was saved with this model. use_fast=True will be the default behavior in v4.48, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with use_fast=False.
You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in huggingface/transformers#24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message.
Some kwargs in processor config are unused and will not have any effect: image_tag, mask_prompt, sft_format, num_image_tokens, add_special_token, ignore_id.
Running on local URL: http://127.0.0.1:7860
Traceback (most recent call last):
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/connectionpool.py", line 534, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/connection.py", line 516, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/http/client.py", line 1395, in getresponse
response.begin()
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/http/client.py", line 325, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/http/client.py", line 286, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/socket.py", line 718, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out

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

Traceback (most recent call last):
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/util/retry.py", line 474, in increment
raise reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/util/util.py", line 39, in reraise
raise value
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/connectionpool.py", line 536, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/urllib3/connectionpool.py", line 367, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.0.17', port=1082): Read timed out. (read timeout=3)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/yajiang/jyd/Janus/demo/app_januspro.py", line 244, in
demo.launch(share=True)
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/gradio/blocks.py", line 2112, in launch
and not networking.url_ok(self.local_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/gradio/networking.py", line 240, in url_ok
r = requests.head(url, timeout=3, verify=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/requests/api.py", line 100, in head
return request("head", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yajiang/anaconda3/envs/deepseek_python311_torch26/lib/python3.11/site-packages/requests/adapters.py", line 713, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.0.17', port=1082): Read timed out. (read timeout=3)

环境:

(deepseek_python311_torch26) yajiang@yajiang:~/jyd/Janus$ conda list

packages in environment at /home/yajiang/anaconda3/envs/deepseek_python311_torch26:

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
_openmp_mutex 4.5 2_gnu https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
accelerate 1.3.0 pypi_0 pypi
aiofiles 23.2.1 pypi_0 pypi
altair 5.5.0 pypi_0 pypi
annotated-types 0.7.0 pypi_0 pypi
anyio 4.8.0 pypi_0 pypi
attrdict 2.0.1 pypi_0 pypi
attrs 25.1.0 pypi_0 pypi
bzip2 1.0.8 h4bc722e_7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
ca-certificates 2025.1.31 hbcca054_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
certifi 2025.1.31 pypi_0 pypi
charset-normalizer 3.4.1 pypi_0 pypi
click 8.1.8 pypi_0 pypi
colorama 0.4.5 pypi_0 pypi
contourpy 1.3.1 pypi_0 pypi
cycler 0.12.1 pypi_0 pypi
einops 0.8.0 pypi_0 pypi
fastapi 0.115.8 pypi_0 pypi
ffmpy 0.5.0 pypi_0 pypi
filelock 3.13.1 pypi_0 pypi
fonttools 4.55.8 pypi_0 pypi
fsspec 2024.6.1 pypi_0 pypi
gradio 3.48.0 pypi_0 pypi
gradio-client 0.6.1 pypi_0 pypi
h11 0.14.0 pypi_0 pypi
httpcore 1.0.7 pypi_0 pypi
httpx 0.28.1 pypi_0 pypi
huggingface-hub 0.28.1 pypi_0 pypi
idna 3.10 pypi_0 pypi
importlib-resources 6.5.2 pypi_0 pypi
janus 1.0.0 pypi_0 pypi
jinja2 3.1.4 pypi_0 pypi
jsonschema 4.23.0 pypi_0 pypi
jsonschema-specifications 2024.10.1 pypi_0 pypi
kiwisolver 1.4.8 pypi_0 pypi
latex2mathml 3.77.0 pypi_0 pypi
ld_impl_linux-64 2.43 h712a8e2_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libexpat 2.6.4 h5888daf_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libffi 3.4.2 h7f98852_5 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libgcc 14.2.0 h77fa898_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libgcc-ng 14.2.0 h69a702a_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libgomp 14.2.0 h77fa898_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
liblzma 5.6.4 hb9d3cd8_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libnsl 2.0.1 hd590300_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libsqlite 3.48.0 hee588c1_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libuuid 2.38.1 h0b41bf4_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libxcrypt 4.4.36 hd590300_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libzlib 1.3.1 hb9d3cd8_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
markdown 3.4.1 pypi_0 pypi
markupsafe 2.1.5 pypi_0 pypi
matplotlib 3.10.0 pypi_0 pypi
mdtex2html 1.3.0 pypi_0 pypi
mpmath 1.3.0 pypi_0 pypi
narwhals 1.25.2 pypi_0 pypi
ncurses 6.5 h2d0b736_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
networkx 3.3 pypi_0 pypi
numpy 1.26.4 pypi_0 pypi
nvidia-cublas-cu12 12.6.4.1 pypi_0 pypi
nvidia-cuda-cupti-cu12 12.6.80 pypi_0 pypi
nvidia-cuda-nvrtc-cu12 12.6.77 pypi_0 pypi
nvidia-cuda-runtime-cu12 12.6.77 pypi_0 pypi
nvidia-cudnn-cu12 9.5.1.17 pypi_0 pypi
nvidia-cufft-cu12 11.3.0.4 pypi_0 pypi
nvidia-curand-cu12 10.3.7.77 pypi_0 pypi
nvidia-cusolver-cu12 11.7.1.2 pypi_0 pypi
nvidia-cusparse-cu12 12.5.4.2 pypi_0 pypi
nvidia-cusparselt-cu12 0.6.3 pypi_0 pypi
nvidia-nccl-cu12 2.21.5 pypi_0 pypi
nvidia-nvjitlink-cu12 12.6.85 pypi_0 pypi
nvidia-nvtx-cu12 12.6.77 pypi_0 pypi
openssl 3.4.0 h7b32b05_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
orjson 3.10.15 pypi_0 pypi
packaging 24.2 pypi_0 pypi
pandas 2.2.3 pypi_0 pypi
pillow 10.4.0 pypi_0 pypi
pip 25.0 pyh8b19718_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
psutil 6.1.1 pypi_0 pypi
pydantic 2.10.6 pypi_0 pypi
pydantic-core 2.27.2 pypi_0 pypi
pydub 0.25.1 pypi_0 pypi
pygments 2.12.0 pypi_0 pypi
pyparsing 3.2.1 pypi_0 pypi
pypinyin 0.50.0 pypi_0 pypi
python 3.11.11 h9e4cc4f_1_cpython https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
python-dateutil 2.9.0.post0 pypi_0 pypi
python-multipart 0.0.20 pypi_0 pypi
pytz 2025.1 pypi_0 pypi
pyyaml 6.0.2 pypi_0 pypi
readline 8.2 h8228510_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
referencing 0.36.2 pypi_0 pypi
regex 2024.11.6 pypi_0 pypi
requests 2.32.3 pypi_0 pypi
rpds-py 0.22.3 pypi_0 pypi
safetensors 0.5.2 pypi_0 pypi
semantic-version 2.10.0 pypi_0 pypi
sentencepiece 0.1.96 pypi_0 pypi
setuptools 75.8.0 pyhff2d567_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
six 1.17.0 pypi_0 pypi
sniffio 1.3.1 pypi_0 pypi
socksio 1.0.0 pypi_0 pypi
starlette 0.45.3 pypi_0 pypi
sympy 1.13.1 pypi_0 pypi
tiktoken 0.5.2 pypi_0 pypi
timm 1.0.14 pypi_0 pypi
tk 8.6.13 noxft_h4845f30_101 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tokenizers 0.21.0 pypi_0 pypi
torch 2.6.0+cu126 pypi_0 pypi
torchaudio 2.6.0+cu126 pypi_0 pypi
torchvision 0.21.0+cu126 pypi_0 pypi
tqdm 4.64.0 pypi_0 pypi
transformers 4.48.2 pypi_0 pypi
triton 3.2.0 pypi_0 pypi
typing-extensions 4.12.2 pypi_0 pypi
tzdata 2025.1 pypi_0 pypi
urllib3 2.3.0 pypi_0 pypi
uvicorn 0.34.0 pypi_0 pypi
websockets 11.0.3 pypi_0 pypi
wheel 0.45.1 pyhd8ed1ab_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant