This repository was archived by the owner on Aug 3, 2023. It is now read-only.
raise Exception in file 'chathub.py' line 196, how to get it? #587
Unanswered
kang121209
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
in file 'chathub.py' line 196,
raise Exception(
f"{response['item']['result']['value']}: {response['item']['result']['message']}",
)
but i don't know how to try .... except ,get this exception?
try:
bot = await Chatbot.create(cookies=cookies, proxy=proxy)
massage = bot.ask_stream(prompt=info.messages, conversation_style=info.conversation_style, raw=True,search_result=True)
except (BaseException,Exception) as e:
print('newbing chat.completion error: ',e)
can not get exception, but Exception in ASGI application?
[2023-07-02 12:17:48 +0800] [1000127] [ERROR] Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 276, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 69, in app
await response(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 270, in call
async with anyio.create_task_group() as task_group:
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 597, in aexit
raise exceptions[0]
File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 273, in wrap
await func()
File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 262, in stream_response
async for chunk in self.body_iterator:
File "/data/web/xiezuo.gptlala.com/aiboxs/api/common.py", line 120, in generate
async for c in massage:
File "/usr/local/lib/python3.10/site-packages/EdgeGPT/EdgeGPT.py", line 185, in ask_stream
async for response in self.chat_hub.ask_stream(
File "/usr/local/lib/python3.10/site-packages/EdgeGPT/chathub.py", line 197, in ask_stream
raise Exception(
Beta Was this translation helpful? Give feedback.
All reactions