SoraRoseous / ChatSydney-react

帮黑暗大佬暂时维护下,已支持图像生成(需cookie)和图像识别,不过图像识别结果仅在当次对话有效。可以进下面的链接体验一下(建议使用自己的cookie,不填默认是用我的,容易上限),这个地址可能会变动。
https://80c9-38-207-143-112.ngrok-free.app
The Unlicense
81 stars 34 forks source link

在海外梯子上运行docker 访问网页提问报错 #4

Closed huoshenw closed 1 year ago

huoshenw commented 1 year ago

anyio._backends._asyncio.ExceptionGroup: 2 exceptions were raised in the task group: chatsydney | ---------------------------- chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 167, in try_connect chatsydney | stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1627, in connect_tcp chatsydney | await get_running_loop().create_connection( chatsydney | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection chatsydney | raise exceptions[0] chatsydney | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection chatsydney | sock = await self._connect_sock( chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock chatsydney | await self.sock_connect(sock, address) chatsydney | File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 634, in sock_connect chatsydney | return await fut chatsydney | ^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 642, in _sock_connect chatsydney | sock.connect(address) chatsydney | OSError: [Errno 99] Cannot assign requested address chatsydney | ---------------------------- chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 167, in try_connect chatsydney | stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1627, in connect_tcp chatsydney | await get_running_loop().create_connection( chatsydney | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection chatsydney | raise exceptions[0] chatsydney | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection chatsydney | sock = await self._connect_sock( 这是什么问题啊

Rarlya1 commented 1 year ago

设置默认代理地址为无

huoshenw commented 1 year ago

在构建docker中如何设置 我只在根目录下添加了一个cookies.json文件 然后运行docker-compose up,其他都是保证默认没有动

Rarlya1 commented 1 year ago

在构建docker中如何设置 我只在根目录下添加了一个cookies.json文件 然后运行docker-compose up,其他都是保证默认没有动

将main.py里,第183行中的 default="http://localhost:7890",改为default=""

huoshenw commented 1 year ago

在构建docker中如何设置 我只在根目录下添加了一个cookies.json文件 然后运行docker-compose up,其他都是保证默认没有动

将main.py里,第183行中的 default="http://localhost:7890",改为default=""

Attaching to chatsydney chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 662, in await_impl chatsydney | await protocol.handshake( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 329, in handshake chatsydney | raise InvalidStatusCode(status_code, response_headers) chatsydney | websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200 chatsydney | chatsydney | During handling of the above exception, another exception occurred: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 655, in await_impl_timeout chatsydney | return await self.await_impl() chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 676, in await_impl__ chatsydney | await protocol.wait_closed() chatsydney | asyncio.exceptions.CancelledError chatsydney | chatsydney | The above exception was the direct cause of the following exception: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/app/main.py", line 28, in sydney_processmessage chatsydney | async for , response in chatbot.ask_stream(prompt=user_message, conversation_style="creative", raw=True, chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 30, in ask_stream chatsydney | async for key, value in super().ask_stream(*args, *kwargs): chatsydney | File "/app/EdgeGPT/EdgeGPT.py", line 186, in ask_stream chatsydney | async for response in self.chat_hub.ask_stream( chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 55, in ask_stream chatsydney | async for key, value in super().ask_stream(args, **kwargs): chatsydney | File "/app/EdgeGPT/chathub.py", line 104, in ask_stream chatsydney | async with connect( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 637, in aenter chatsydney | return await self chatsydney | ^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 654, in await_impl_timeout chatsydney | async with asyncio_timeout(self.open_timeout): chatsydney | File "/usr/local/lib/python3.11/asyncio/timeouts.py", line 111, in aexit__ chatsydney | raise TimeoutError from exc_val chatsydney | TimeoutError 改好以后提问出现这个报错

SoraRoseous commented 1 year ago

在构建docker中如何设置 我只在根目录下添加了一个cookies.json文件 然后运行docker-compose up,其他都是保证默认没有动

将main.py里,第183行中的 default="http://localhost:7890",改为default=""

Attaching to chatsydney chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 662, in await_impl chatsydney | await protocol.handshake( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 329, in handshake chatsydney | raise InvalidStatusCode(status_code, response_headers) chatsydney | websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200 chatsydney | chatsydney | During handling of the above exception, another exception occurred: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 655, in await_impl_timeout chatsydney | return await self.await_impl() chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 676, in await_impl chatsydney | await protocol.wait_closed() chatsydney | asyncio.exceptions.CancelledError chatsydney | chatsydney | The above exception was the direct cause of the following exception: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/app/main.py", line 28, in sydney_processmessage chatsydney | async for , response in chatbot.ask_stream(prompt=user_message, conversation_style="creative", raw=True, chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 30, in ask_stream chatsydney | async for key, value in super().ask_stream(*args, *kwargs): chatsydney | File "/app/EdgeGPT/EdgeGPT.py", line 186, in ask_stream chatsydney | async for response in self.chat_hub.ask_stream( chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 55, in ask_stream chatsydney | async for key, value in super().ask_stream(args, kwargs): chatsydney | File "/app/EdgeGPT/chathub.py", line 104, in ask_stream chatsydney | async with connect( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 637, in aenter chatsydney | return await self chatsydney | ^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 654, in await_impl_timeout chatsydney | async with asyncio_timeout(self.open_timeout): chatsydney | File "/usr/local/lib/python3.11/asyncio/timeouts.py", line 111, in aexit** chatsydney | raise TimeoutError from exc_val chatsydney | TimeoutError 改好以后提问出现这个报错

现在微软好像对这个接口进行了限制,等edgeGPT修复吧

SoraRoseous commented 1 year ago

在构建docker中如何设置 我只在根目录下添加了一个cookies.json文件 然后运行docker-compose up,其他都是保证默认没有动

将main.py里,第183行中的 default="http://localhost:7890",改为default=""

Attaching to chatsydney chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 662, in await_impl chatsydney | await protocol.handshake( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 329, in handshake chatsydney | raise InvalidStatusCode(status_code, response_headers) chatsydney | websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200 chatsydney | chatsydney | During handling of the above exception, another exception occurred: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 655, in await_impl_timeout chatsydney | return await self.await_impl() chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 676, in await_impl chatsydney | await protocol.wait_closed() chatsydney | asyncio.exceptions.CancelledError chatsydney | chatsydney | The above exception was the direct cause of the following exception: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/app/main.py", line 28, in sydney_processmessage chatsydney | async for , response in chatbot.ask_stream(prompt=user_message, conversation_style="creative", raw=True, chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 30, in ask_stream chatsydney | async for key, value in super().ask_stream(*args, *kwargs): chatsydney | File "/app/EdgeGPT/EdgeGPT.py", line 186, in ask_stream chatsydney | async for response in self.chat_hub.ask_stream( chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 55, in ask_stream chatsydney | async for key, value in super().ask_stream(args, kwargs): chatsydney | File "/app/EdgeGPT/chathub.py", line 104, in ask_stream chatsydney | async with connect( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 637, in aenter chatsydney | return await self chatsydney | ^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 654, in await_impl_timeout chatsydney | async with asyncio_timeout(self.open_timeout): chatsydney | File "/usr/local/lib/python3.11/asyncio/timeouts.py", line 111, in aexit** chatsydney | raise TimeoutError from exc_val chatsydney | TimeoutError 改好以后提问出现这个报错

现在微软好像对这个接口进行了限制,等edgeGPT修复吧

已修复https://github.com/acheong08/EdgeGPT/pull/610 ,需要cookies.json文件才能正常使用

huoshenw commented 1 year ago

在构建docker中如何设置 我只在根目录下添加了一个cookies.json文件 然后运行docker-compose up,其他都是保证默认没有动

将main.py里,第183行中的 default="http://localhost:7890",改为default=""

Attaching to chatsydney chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 662, in await_impl chatsydney | await protocol.handshake( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 329, in handshake chatsydney | raise InvalidStatusCode(status_code, response_headers) chatsydney | websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200 chatsydney | chatsydney | During handling of the above exception, another exception occurred: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 655, in await_impl_timeout chatsydney | return await self.await_impl() chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 676, in await_impl chatsydney | await protocol.wait_closed() chatsydney | asyncio.exceptions.CancelledError chatsydney | chatsydney | The above exception was the direct cause of the following exception: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/app/main.py", line 28, in sydney_processmessage chatsydney | async for , response in chatbot.ask_stream(prompt=user_message, conversation_style="creative", raw=True, chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 30, in ask_stream chatsydney | async for key, value in super().ask_stream(*args, *kwargs): chatsydney | File "/app/EdgeGPT/EdgeGPT.py", line 186, in ask_stream chatsydney | async for response in self.chat_hub.ask_stream( chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 55, in ask_stream chatsydney | async for key, value in super().ask_stream(args, kwargs): chatsydney | File "/app/EdgeGPT/chathub.py", line 104, in ask_stream chatsydney | async with connect( chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 637, in aenter chatsydney | return await self chatsydney | ^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/websockets/legacy/client.py", line 654, in await_impl_timeout chatsydney | async with asyncio_timeout(self.open_timeout): chatsydney | File "/usr/local/lib/python3.11/asyncio/timeouts.py", line 111, in aexit** chatsydney | raise TimeoutError from exc_val chatsydney | TimeoutError 改好以后提问出现这个报错

现在微软好像对这个接口进行了限制,等edgeGPT修复吧

已修复acheong08/EdgeGPT#610 ,需要cookies.json文件才能正常使用

我重新拉取以后 在文件夹内放入cookies.json同时修改了默认代理地址为无 docker-compose up 提问以后还是报错 The above exception was the direct cause of the following exception: chatsydney | chatsydney | Traceback (most recent call last): chatsydney | File "/app/main.py", line 27, in sydney_process_message chatsydney | chatbot = await Chatbot.create(cookies=cookies, proxy=args.proxy, imgid=imgid) chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 20, in create chatsydney | obj = await EdgeChatBot.create(*args, **kwargs) chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/app/EdgeGPT/EdgeGPT.py", line 43, in create chatsydney | await Conversation.create(self.proxy, cookies=cookies, imgid=imgid), chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/app/EdgeGPT/conversation.py", line 110, in create chatsydney | response = await client.get( chatsydney | ^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get chatsydney | return await self.request( chatsydney | ^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request chatsydney | return await self.send(request, auth=auth, follow_redirects=follow_redirects) chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send chatsydney | response = await self._send_handling_auth( chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth chatsydney | response = await self._send_handling_redirects( chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects chatsydney | response = await self._send_single_request(request) chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1719, in _send_single_request chatsydney | response = await transport.handle_async_request(request) chatsydney | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 352, in handle_async_request chatsydney | with map_httpcore_exceptions(): chatsydney | File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit chatsydney | self.gen.throw(typ, value, traceback) chatsydney | File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions chatsydney | raise mapped_exc(message) from exc chatsydney | httpx.ConnectError: All connection attempts failed

SoraRoseous commented 1 year ago

@huoshenw 检查一下你的服务器能不能直接使用bing的服务,不能的话就只能开代理了

huoshenw commented 1 year ago

Traceback (most recent call last): chatsydney | File "/app/main.py", line 28, in sydney_processmessage chatsydney | async for , response in chatbot.ask_stream(prompt=user_message, conversation_style="creative", raw=True, chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 30, in ask_stream chatsydney | async for key, value in super().ask_stream(*args, *kwargs): chatsydney | File "/app/EdgeGPT/EdgeGPT.py", line 186, in ask_stream chatsydney | async for response in self.chat_hub.ask_stream( chatsydney | File "/app/SydneyGPT/SydneyGPT.py", line 55, in ask_stream chatsydney | async for key, value in super().ask_stream(args, **kwargs): chatsydney | File "/app/EdgeGPT/chathub.py", line 213, in ask_stream chatsydney | raise Exception( chatsydney | Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.

@huoshenw 检查一下你的服务器能不能直接使用bing的服务,不能的话就只能开代理了

有变化 大佬这个是什么报错

SoraRoseous commented 1 year ago

有变化 大佬这个是什么报错

去官网登录你的账号,发一条消息,点一下验证就可以了

huoshenw commented 1 year ago

有变化 大佬这个是什么报错

去官网登录你的账号,发一条消息,点一下验证就可以了

终于成功 感谢大佬