kotaemon icon indicating copy to clipboard operation
kotaemon copied to clipboard

Cannot statically find a gradio demo called demo. Reload work may fail.

Open Tanguosen opened this issue 1 year ago • 10 comments

Description

When I successfully run the docker container, I can't reach the ip port, here are my logs: 641b891e9ff0b29458b1040d3c08e41

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

Warning: Cannot statically find a gradio demo called demo. Reload work may fail.
Watching: '/app' '/app'

Browsers

No response

OS

No response

Additional information

No response

Tanguosen avatar Sep 02 '24 15:09 Tanguosen

Same here, M2 pro

enderphan94 avatar Sep 03 '24 06:09 enderphan94

Same here. M1 Pro

RajatBhardwaj007 avatar Sep 03 '24 11:09 RajatBhardwaj007

Same here. Ubuntu 18.04

dingshengqin avatar Sep 04 '24 04:09 dingshengqin

Warning: Cannot statically find a gradio demo called demo. Reload work may fail. Watching: '/app' '/app' [nltk_data] Downloading package punkt_tab to [nltk_data] /usr/local/lib/python3.10/site- [nltk_data] packages/llama_index/core/_static/nltk_cache... [nltk_data] Unzipping tokenizers/punkt_tab.zip. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) OSError: [Errno 101] Network is unreachable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 716, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1061, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f9daa8286a0>: Failed to establish a new connection: [Errno 101] Network is unreachable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 802, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 594, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/spaces/lone17/kotaemon (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9daa8286a0>: Failed to establish a new connection: [Errno 101] Network is unreachable')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/app.py", line 15, in app = App() File "/app/libs/ktem/ktem/app.py", line 42, in init self._theme = gr.Theme.from_hub("lone17/kotaemon") File "/usr/local/lib/python3.10/site-packages/gradio/themes/base.py", line 187, in from_hub space_info = api.space_info(name) File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2518, in space_info r = get_session().get(path, headers=headers, timeout=timeout, params=params) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 66, in send return super().send(request, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/spaces/lone17/kotaemon (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9daa8286a0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: 3056cffc-db16-44d7-9a07-96dcc2da4590)') bt_successful

It may be because you can't access HuggingFace in China?

Tanguosen avatar Sep 04 '24 07:09 Tanguosen

For those who's getting error of using docker, you can switch to install it directly via python, it works well on my M2 Pro chip. P/s: It works on python >= 3.10, sudo is needed in my case.

enderphan94 avatar Sep 05 '24 05:09 enderphan94

sudo docker run -e GRADIO_SERVER_NAME=0.0.0.0 -e GRADIO_SERVER_PORT=7860 -p 7860:7860 -it --rm taprosoft/kotaemon:v1.0

Warning: Cannot statically find a gradio demo called demo. Reload work may fail. Watching: '/app' '/app'

[nltk_data] Error loading punkt_tab: <urlopen error [Errno 111] [nltk_data] Connection refused>

same problem for ubuntu22.04. Try to switch on install it directly via python.Hope me succeed

CaMi1le avatar Sep 05 '24 08:09 CaMi1le

Thanks!

丁生秦 Ding Shengqin (Mr.) Body Shop Planning Digitalization& Series Planning

From: CaMi1le @.> Sent: Thursday, September 5, 2024 4:56 PM To: Cinnamon/kotaemon @.> Cc: Ding, Shengqin (VWA-PP2E) @.>; Comment @.> Subject: Re: [Cinnamon/kotaemon] Cannot statically find a gradio demo called demo. Reload work may fail. (Issue #183)

sudo docker run -e GRADIO_SERVER_NAME=0.0.0.0 -e GRADIO_SERVER_PORT=7860 -p 7860:7860 -it --rm taprosoft/kotaemon:v1.0

Warning: Cannot statically find a gradio demo called demo. Reload work may fail. Watching: '/app' '/app'

[nltk_data] Error loading punkt_tab: <urlopen error [Errno 111] [nltk_data] Connection refused>

same problem for ubuntu22.04. Try to switch on install it directly via python.Hope me succeed

— Reply to this email directly, view it on GitHubhttps://github.com/Cinnamon/kotaemon/issues/183#issuecomment-2330975268, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP6EF5FRXZI6GL6QJY3XEJDZVAMC7AVCNFSM6AAAAABNQSX5UWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZQHE3TKMRWHA. You are receiving this because you commented.Message ID: @.@.>>

INTERNAL

dingshengqin avatar Sep 05 '24 09:09 dingshengqin

中国大陆网络无法直连huggingface.io.而hf-mirror.com也暂时因为 由于流量过大,本站暂不支持访问 Spaces 空间,可前往 Hugging Face 官网查看。 无法访问。

Tanguosen avatar Sep 05 '24 10:09 Tanguosen

docker run -e https_proxy=你的代理ip:port -e https_proxy=你的代理ip:port -e GRADIO_SERVER_NAME=0.0.0.0 -e GRADIO_SERVER_PORT=7860 -p 7860:7860 --name kotaemon taprosoft/kotaemon:v1.0

Tanguosen avatar Sep 05 '24 14:09 Tanguosen

just the problem of VPN, use it.

zhoufy20 avatar Oct 07 '24 00:10 zhoufy20