zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
31.23k stars 8.14k forks source link

Get other_user_id failed: 'UserName' #2251

Open Wang-zhechao opened 3 months ago

Wang-zhechao commented 3 months ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Docker

运行的python版本是?

python 3.10

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

  1. pull the latest docker images
  2. start up docker

问题描述 😯

[WARNING][2024-08-15 04:49:26][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-15 06:45:20][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND [WARNING][2024-08-15 06:48:37][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-15 06:48:54][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 466, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1095, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 652, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 805, in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrapsocket( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 465, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, serverhostname) File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 509, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.10/ssl.py", line 1104, in _create self.do_handshake() File "/usr/local/lib/python3.10/ssl.py", line 1375, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 490, in _make_request raise new_e urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:1007)

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

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 843, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxsync?sid=3/G3xn0uYEb1BcGh&skey=@crypt_20ae59bd_ba4eda507d3f986fbb6963052a8deff5&pass_ticket=rpFrSVPTfcjDkoFK7xA1Zyvk3aRAgvNsBPmZwCoiNHM3RXl5QRdWqTLy8uLg2cNWT%2FwP2E5StxDce1g%2FwbmnUQ%3D%3D (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib/itchat/components/login.py", line 301, in maintain_loop msgList, contactList = self.get_msg() File "/app/lib/itchat/components/login.py", line 390, in get_msg r = self.s.post(url, data=json.dumps(data), File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 698, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxsync?sid=3/G3xn0uYEb1BcGh&skey=@crypt_20ae59bd_ba4eda507d3f986fbb6963052a8deff5&pass_ticket=rpFrSVPTfcjDkoFK7xA1Zyvk3aRAgvNsBPmZwCoiNHM3RXl5QRdWqTLy8uLg2cNWT%2FwP2E5StxDce1g%2FwbmnUQ%3D%3D (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 466, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1095, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 652, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 805, in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrapsocket( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 465, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, serverhostname) File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 509, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.10/ssl.py", line 1104, in _create self.do_handshake() File "/usr/local/lib/python3.10/ssl.py", line 1375, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 490, in _make_request raise new_e urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:1007)

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

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 843, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxsync?sid=3/G3xn0uYEb1BcGh&skey=@crypt_20ae59bd_ba4eda507d3f986fbb6963052a8deff5&pass_ticket=rpFrSVPTfcjDkoFK7xA1Zyvk3aRAgvNsBPmZwCoiNHM3RXl5QRdWqTLy8uLg2cNWT%2FwP2E5StxDce1g%2FwbmnUQ%3D%3D (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib/itchat/components/login.py", line 301, in maintain_loop msgList, contactList = self.get_msg() File "/app/lib/itchat/components/login.py", line 390, in get_msg r = self.s.post(url, data=json.dumps(data), File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 698, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxsync?sid=3/G3xn0uYEb1BcGh&skey=@crypt_20ae59bd_ba4eda507d3f986fbb6963052a8deff5&pass_ticket=rpFrSVPTfcjDkoFK7xA1Zyvk3aRAgvNsBPmZwCoiNHM3RXl5QRdWqTLy8uLg2cNWT%2FwP2E5StxDce1g%2FwbmnUQ%3D%3D (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))

[WARNING][2024-08-16 09:46:11][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-16 10:31:13][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND [WARNING][2024-08-16 10:34:02][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND [WARNING][2024-08-16 10:41:37][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-16 10:41:52][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 464, in getresponse httplib_response = super().getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 843, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 474, in increment raise reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.10/site-packages/urllib3/util/util.py", line 38, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 464, in getresponse httplib_response = super().getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib/itchat/components/login.py", line 301, in maintain_loop msgList, contactList = self.get_msg() File "/app/lib/itchat/components/login.py", line 390, in get_msg r = self.s.post(url, data=json.dumps(data), File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 682, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 464, in getresponse httplib_response = super().getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 843, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 474, in increment raise reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.10/site-packages/urllib3/util/util.py", line 38, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 464, in getresponse httplib_response = super().getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib/itchat/components/login.py", line 301, in maintain_loop msgList, contactList = self.get_msg() File "/app/lib/itchat/components/login.py", line 390, in get_msg r = self.s.post(url, data=json.dumps(data), File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 682, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

[WARNING][2024-08-17 09:25:34][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-17 10:12:54][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-17 10:30:20][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-17 10:53:34][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND [WARNING][2024-08-17 10:53:50][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND [WARNING][2024-08-17 13:55:29][wechat_message.py:92] - [WX]get other_user_id failed: 'UserName' [WARNING][2024-08-17 16:54:23][chat_channel.py:231] - [chat_channel] unknown context type: ACCEPT_FRIEND Unexpected sync check result: window.synccheck={retcode:"1101",selector:"0"}

终端日志 📒

No response

laoyingwei commented 2 months ago

我也遇到这个问题 应该是微信的 NickName字段 新版本 好像没返回的 wechat_messsage.py代码中报错了

wupeisheng commented 2 months ago

个人微信同样问题,用不了