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

不管是哪个模块启动,只要点“开始和GLM2交流吧”,就报KeyError: 'dataset'`的错误。 #4

Open
lzy83925 opened this issue Jul 21, 2023 · 4 comments

Comments

@lzy83925
Copy link

`EpollSelector
DEBUG:httpx:load_ssl_context verify=True cert=None trust_env=True http2=False
DEBUG:httpx:load_verify_locations cafile='/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/certifi/cacert.pem'
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:7860
DEBUG:urllib3.connectionpool:http://localhost:7860 "GET /startup-events HTTP/1.1" 200 5
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:7860
DEBUG:urllib3.connectionpool:http://localhost:7860 "HEAD / HTTP/1.1" 200 0
Running on local URL: http://0.0.0.0:7860

To create a public link, set share=True in launch().
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.gradio.app:443
DEBUG:urllib3.connectionpool:https://api.gradio.app:443 "POST /gradio-initiated-analytics/ HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://api.gradio.app:443 "POST /gradio-launched-telemetry/ HTTP/1.1" 200 None
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/fastapi/applications.py", line 289, in call
await super().call(scope, receive, send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/gradio/routes.py", line 291, in api_info
return gradio.blocks.get_api_info(config, serialize) # type: ignore
File "/home/bxd/miniconda3/envs/glmsd/lib/python3.10/site-packages/gradio/blocks.py", line 528, in get_api_info
serializer = serializing.COMPONENT_MAPPINGtype
KeyError: 'dataset'`

@ZenXir
Copy link

ZenXir commented Jul 21, 2023

我也是报一样的错误 大佬给讲解下吧

image

@ZenXir
Copy link

ZenXir commented Jul 21, 2023

@KevinWang676 @lzy83925 解决了 把gradio升级到3.38.0就可以了
可以查看这个bug说明:
AUTOMATIC1111/stable-diffusion-webui#11855

@KevinWang676
Copy link
Owner

感谢提醒!因为在HuggingFace上gradio==3.36.1是可以的,但本地可能需要升级版本

@QiaoTuCodes
Copy link

QiaoTuCodes commented Nov 21, 2023

感谢提醒!因为在HuggingFace上gradio==3.36.1是可以的,但本地可能需要升级版本

两个原因导致此类问题,严格来说不是BUG:

1.确保你在部署安装的过程中,有绝对的执行了req.txt里的准确版本安装,某些情况下,出现找不到具体版本的可能是源需要更新,先使用pip install gradio == 99999 命令查看一下当前源中,都有那些可用版本。只有版本对了,就没有任何问题。如果你的gradio版本太超前&太落后都是不可取的,请一定按照版本要求装。

2.大部分情况是大陆地区对仓库站点访问的受限,最好在拉库之前设置代理,此外假如你是容器中部署,那么容器的内网络和宿主机网络是不一样的。那么建议你在容器内开启代理后再拉库更新即可。

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

4 participants