xbzstudio / Timeless-Sydney

好用的New Bing web客户端,功能众多~
https://xbzstudio.github.io/Timeless-Sydney
MIT License
661 stars 168 forks source link

前端连接后端就报错,报错代码如下,有什么头绪吗? #22

Open Dounyl opened 1 year ago

Dounyl commented 1 year ago

INFO: connection open INFO: connection closed INFO: ('127.0.0.1', 49576) - "WebSocket /ws_stream" [accepted] ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore\backends\sync.py", line 62, in start_tls raise exc File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore\backends\sync.py", line 57, in start_tls sock = ssl_context.wrap_socket( File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 512, in wrap_socket return self.sslsocket_class._create( File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 1070, in _create self.do_handshake() File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 1341, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 218, in handle_request resp = self._pool.handle_request(req) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\connection_pool.py", line 253, in handle_request raise exc File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\connection_pool.py", line 237, in handle_request response = connection.handle_request(request) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\http_proxy.py", line 261, in handle_request connect_response = self._connection.handle_request( File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\connection.py", line 86, in handle_request raise exc File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\connection.py", line 63, in handle_request stream = self._connect(request) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\connection.py", line 150, in _connect stream = stream.start_tls(**kwargs) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore\backends\sync.py", line 54, in start_tls with map_exceptions(exc_map): File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: EOF occurred in violation of protocol (_ssl.c:997)

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

Traceback (most recent call last): File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 254, in run_asgi result = await self.app(self.scope, self.asgi_receive, self.asgi_send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call return await self.app(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\applications.py", line 276, in call await super().call(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\errors.py", line 149, in call await self.app(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\cors.py", line 76, in call await self.app(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call raise exc File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call await self.app(scope, receive, sender) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in call raise e File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 718, in call await route.handle(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 341, in handle await self.app(scope, receive, send) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 82, in app await func(session) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\routing.py", line 289, in app await dependant.call(**values) File "C:\Users\TheDan\Desktop\BingAI-Client-BingAI-Client1.6.2\BingServer.py", line 268, in wsStream chatBot = EdgeGPT.Chatbot(proxy=PROXY, cookies=cookies) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\EdgeGPT.py", line 619, in init _Conversation(self.cookies, self.proxy), File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\EdgeGPT.py", line 325, in init response = self.session.get( File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1041, in get return self.request( File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 814, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 901, in send response = self._send_handling_auth( File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 929, in _send_handling_auth response = self._send_handling_redirects( File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 966, in _send_handling_redirects response = self._send_single_request(request) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1002, in _send_single_request response = transport.handle_request(request) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 217, in handle_request with map_httpcore_exceptions(): File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\TheDan\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: EOF occurred in violation of protocol (_ssl.c:997)

xbzstudio commented 1 year ago

第一次遇到这个报错

xbzstudio commented 1 year ago

看上去是关于ssl的

464529323 commented 1 year ago

我和你一样,怎么弄?

AriaKing99 commented 1 year ago

请问解决了吗