Closed TaoXiaoBai closed 1 year ago
如果你想只使用文心一言,参考 README 设置一下 default_ai 为 yiyan。
如果你想只使用文心一言,参考 README 设置一下 default_ai 为 yiyan。
我是想默认使用new bing,当我把default_ai切换到bing-b的时候,日志是这样的```
`2023-03-27 00:58:16.497 | INFO | platforms.telegram_bot:bootstrap:96 - 启动完毕,接收消息中……
ERROR:telegram.ext._updater:Error while getting Updates: httpx.ConnectError:
ERROR:telegram.ext._updater:Exception happened while polling for updates.
Traceback (most recent call last):
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\anyio\streams\tls.py", line 130, in _call_sslobject_method
result = func(*args)
^^^^^^^^^^^
File "ssl.py", line 979, in do_handshake
ssl.SSLSyscallError: Some I/O error occurred (_ssl.c:992)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
yield
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\backends\asyncio.py", line 78, in start_tls
raise exc
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\backends\asyncio.py", line 69, in start_tls
ssl_stream = await anyio.streams.tls.TLSStream.wrap(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\anyio\streams\tls.py", line 122, in wrap
await wrapper._call_sslobject_method(ssl_object.do_handshake)
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\anyio\streams\tls.py", line 151, in _call_sslobject_method
raise BrokenResourceError from exc
anyio.BrokenResourceError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
yield
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\_async\connection_pool.py", line 253, in handle_async_request
raise exc
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\_async\connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\_async\http_proxy.py", line 289, in handle_async_request
stream = await stream.start_tls(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\backends\asyncio.py", line 66, in start_tls
with map_exceptions(exc_map):
File "contextlib.py", line 155, in __exit__
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
raise to_exc(exc)
httpcore.ConnectError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\request\_httpxrequest.py", line 216, in do_request
res = await self._client.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_client.py", line 1620, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_transports\default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "contextlib.py", line 155, in __exit__
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\ext\_updater.py", line 607, in _network_loop_retry
if not await action_cb():
^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\ext\_updater.py", line 335, in polling_action_cb
raise exc
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\ext\_updater.py", line 320, in polling_action_cb
updates = await self.bot.get_updates(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\ext\_extbot.py", line 530, in get_updates
updates = await super().get_updates(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\_bot.py", line 368, in decorator
result = await func(*args, **kwargs) # skipcq: PYL-E1102
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\_bot.py", line 3623, in get_updates
await self._post(
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\_bot.py", line 456, in _post
return await self._do_post(
^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\ext\_extbot.py", line 312, in _do_post
return await super()._do_post(
^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\_bot.py", line 487, in _do_post
return await request.post(
^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\request\_baserequest.py", line 165, in post
result = await self._request_wrapper(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\request\_baserequest.py", line 288, in _request_wrapper
raise exc
File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\request_baserequest.py", line 274, in _request_wrapper code, payload = await self.do_request( ^^^^^^^^^^^^^^^^^^^^^^ File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\request_httpxrequest.py", line 240, in do_request raise NetworkError(f"httpx.{err.class.name}: {err}") from err telegram.error.NetworkError: httpx.ConnectError:`
你这个就是单纯的网络问题了。 换个好点的梯子吧
你这个就是单纯的网络问题了。 换个好点的梯子吧
尝试更换以后log是这样```
2023-03-27 01:12:45.950 | INFO | platforms.telegram_bot:bootstrap:96 - 启动完毕,接收消息中…… ERROR:telegram.ext._application:No error handlers are registered, logging exception. Traceback (most recent call last): File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\ext_application.py", line 1115, in process_update await coroutine File "I:\tgbot\chatgpt\python3.11\Lib\site-packages\telegram\ext_handler.py", line 141, in handle_update return await self.callback(update, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\tgbot\chatgpt\platforms\telegram_bot.py", line 49, in on_message await handle_message( File "I:\tgbot\chatgpt\universal.py", line 50, in handle_message conversation_handler.current_conversation = await conversation_handler.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\tgbot\chatgpt\conversation.py", line 227, in create conversation = ConversationContext(_type, self.session_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\tgbot\chatgpt\conversation.py", line 71, in init self.adapter = BingAdapter(self.session_id, ConversationStyle.balanced) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\tgbot\chatgpt\adapter\ms\bing.py", line 30, in init name, value = line.split("=", 1) ^^^^^^^^^^^ ValueError: not enough values to unpack (expected 2, got 1)
估计是你cookie有问题,读取的时候出错了。
估计是你cookie有问题,读取的时候出错了。
感谢,应该是cookie出问题了,刚刚试了下api可以用,我白天再试试new bing。
提交 issue 前,请先确认:
表现
登陆以后向bot发送消息会提示ERROR:telegram.ext._application:No error handlers are registered, logging exception.
运行环境:
截图
其他内容
此处填写其他内容,没有可跳过