Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 这是安装requirements.txt失败了吗? #95

Open
1 task done
taozhiyuai opened this issue Oct 2, 2023 · 2 comments
Open
1 task done

[Bug]: 这是安装requirements.txt失败了吗? #95

taozhiyuai opened this issue Oct 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@taozhiyuai
Copy link

Search for answers in existing issues

  • I have searched issues, there is no issue related to the problem I encountered

Python version

other

Issue description

安装requirements.txt出现下列信息。这是出错了?为啥还卸载了?最新的python 3.11.5

Downloading openai-0.27.8-py3-none-any.whl (73 kB) ---------------------------------------- 73.6/73.6 kB 1.3 MB/s eta 0:00:00 Downloading pydantic-2.1.1-py3-none-any.whl (370 kB) ---------------------------------------- 370.9/370.9 kB 1.4 MB/s eta 0:00:00 Downloading litellm-0.1.365-py3-none-any.whl (35 kB) Downloading pydantic_core-2.4.0-cp311-none-win_amd64.whl (1.7 MB) ---------------------------------------- 1.7/1.7 MB 1.4 MB/s eta 0:00:00 Downloading annotated_types-0.5.0-py3-none-any.whl (11 kB) Installing collected packages: pyfiglet, websocket_client, termcolor, pydantic-core, lxml, dulwich, charset-normalizer, beautifulsoup4, annotated-types, requests, pydantic, openai, litellm Attempting uninstall: websocket_client Found existing installation: websocket-client 1.2.0 Uninstalling websocket-client-1.2.0: Successfully uninstalled websocket-client-1.2.0 Attempting uninstall: lxml Found existing installation: lxml 4.9.3 Uninstalling lxml-4.9.3: Successfully uninstalled lxml-4.9.3 Attempting uninstall: dulwich Found existing installation: dulwich 0.21.6 Uninstalling dulwich-0.21.6: Successfully uninstalled dulwich-0.21.6 Attempting uninstall: charset-normalizer Found existing installation: charset-normalizer 3.3.0 Uninstalling charset-normalizer-3.3.0: Successfully uninstalled charset-normalizer-3.3.0 Attempting uninstall: beautifulsoup4 Found existing installation: beautifulsoup4 4.12.2 Uninstalling beautifulsoup4-4.12.2: Successfully uninstalled beautifulsoup4-4.12.2 Attempting uninstall: requests Found existing installation: requests 2.28.2 Uninstalling requests-2.28.2: Successfully uninstalled requests-2.28.2 Attempting uninstall: pydantic Found existing installation: pydantic 1.10.13 Uninstalling pydantic-1.10.13: Successfully uninstalled pydantic-1.10.13 Attempting uninstall: openai Found existing installation: openai 0.27.10 Uninstalling openai-0.27.10: Successfully uninstalled openai-0.27.10 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. chatgpt-tool-hub 0.4.6 requires beautifulsoup4~=4.12.0, but you have beautifulsoup4 4.11.1 which is incompatible. chatgpt-tool-hub 0.4.6 requires pydantic~=1.10.7, but you have pydantic 2.1.1 which is incompatible. chatgpt-tool-hub 0.4.6 requires requests~=2.28.2, but you have requests 2.28.1 which is incompatible. Successfully installed annotated-types-0.5.0 beautifulsoup4-4.11.1 charset-normalizer-2.1.1 dulwich-0.21.5 litellm-0.1.365 lxml-4.9.2 openai-0.27.8 pydantic-2.1.1 pydantic-core-2.4.0 pyfiglet-0.8.post1 requests-2.28.1 termcolor-2.1.1 websocket_client-1.5.1

Repro steps

No response

Relevant log output

No response

@taozhiyuai taozhiyuai added the bug Something isn't working label Oct 2, 2023
@taozhiyuai
Copy link
Author

运行app.py出现以下信息

`Administrator@DESKTOP-8SNFVVT MINGW64 ~/wechat-gptbot (main)
$ python app.py
[INFO][2023-10-03 07:52:14][config.py:17] - Load config: {'openai_api_key': 'YOUR API SECRET KEY', 'model': 'gpt-3.5-turbo', 'use_azure_chatgpt': False, 'azure_deployment_id': '', 'role_desc': 'You are a helpful assistant.', 'session_expired_duration': 3600, 'max_tokens': 1000, 'temperature': 0.9, 'proxy': '', 'openai_api_base': '', 'create_image_size': '256x256', 'create_image_prefix': ['draw', 'paint', 'imagine'], 'clear_current_session_command': '#clear session', 'clear_all_sessions_command': '#clear all sessions', 'chat_group_session_independent': False, 'single_chat_prefix': ['bot', '@bot'], 'query_key_command': '#query key', 'recent_days': 5, 'plugins': [{'name': 'tiktok', 'command': '#tiktok'}], 'openai_sensitive_id': ''}


| | / /__ / / / ____ / / / / __ / / __ ) / /
| | /| / / _ / / / __ / __ `/ __/ / / __/ /
/ / / / / __ / __ / _/
| |/ |/ / / /
/ / / / /
/ / /
/ // / / / / / // / // / /
|/|/_/_
/
/ //_,/_/ _// // /_/_/__/

[INFO][2023-10-03 07:52:14][manager.py:42] - Checking plugins...
[INFO][2023-10-03 07:52:14][manager.py:57] - Installing plugins: {'tiktok'}
[INFO][2023-10-03 07:52:17][manager.py:80] - Installing dependencies for tiktok
Requirement already satisfied: requests==2.28.1 in c:\users\administrator\appdata\local\programs\python\python311\lib\site-packages (from -r ./plugins\tiktok\requirements.txt (line 1)) (2.28.1)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\administrator\appdata\local\programs\python\python311\lib\site-packages (from requests==2.28.1->-r ./plugins\tiktok\requirements.txt (line 1)) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\administrator\appdata\local\programs\python\python311\lib\site-packages (from requests==2.28.1->-r ./plugins\tiktok\requirements.txt (line 1)) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\administrator\appdata\local\programs\python\python311\lib\site-packages (from requests==2.28.1->-r ./plugins\tiktok\requirements.txt (line 1)) (1.26.16)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\administrator\appdata\local\programs\python\python311\lib\site-packages (from requests==2.28.1->-r ./plugins\tiktok\requirements.txt (line 1)) (2023.7.22)
[INFO][2023-10-03 07:52:21][manager.py:84] - Install plugin tiktok successfully
[ERROR][2023-10-03 07:52:23][api.py:46] - Get personal info failed!
[ERROR][2023-10-03 07:52:23][api.py:47] - HTTPConnectionPool(host='127.0.0.1', port=5555): Max retries exceeded with url: //api/get_personal_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002AA71D159D0>: Failed to establish a new connection: [WinError 10061] ▒▒▒▒Ŀ▒▒▒▒▒▒▒▒▒▒▒ܾ▒▒▒▒޷▒▒▒▒ӡ▒'))
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
raise err
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] ▒▒▒▒Ŀ▒▒▒▒▒▒▒▒▒▒▒ܾ▒▒▒▒޷▒▒▒▒ӡ▒

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1041, in _send_output
self.send(msg)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 979, in send
self.connect()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 205, in connect
conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000002AA71D159D0>: Failed to establish a new connection: [WinError 10061] ▒▒▒▒Ŀ▒▒▒▒▒▒▒▒▒▒▒ܾ▒▒▒▒޷▒▒▒▒ӡ▒

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=5555): Max retries exceeded with url: //api/get_personal_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002AA71D159D0>: Failed to establish a new connection: [WinError 10061] ▒▒▒▒Ŀ▒▒▒▒▒▒▒▒▒▒▒ܾ▒▒▒▒޷▒▒▒▒ӡ▒'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\wechat-gptbot\utils\api.py", line 32, in get_personal_info
response = fetch(path, data)
^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\wechat-gptbot\utils\api.py", line 21, in fetch
response = requests.post(url, json={"para": base_data}, timeout=5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5555): Max retries exceeded with url: //api/get_personal_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002AA71D159D0>: Failed to establish a new connection: [WinError 10061] ▒▒▒▒Ŀ▒▒▒▒▒▒▒▒▒▒▒ܾ▒▒▒▒޷▒▒▒▒ӡ▒'))
[INFO][2023-10-03 07:52:23][wechat.py:40] - App startup successfully!
[ERROR][2023-10-03 07:52:25][wechat.py:218] - [Websocket] Error: [WinError 10061] ▒▒▒▒Ŀ▒▒▒▒▒▒▒▒▒▒▒ܾ▒▒▒▒޷▒▒▒▒ӡ▒
[ERROR][2023-10-03 07:52:25][wechat.py:218] - [Websocket] Error: WeChatChannel.on_close() takes 2 positional arguments but 4 were given
Enumerating objects: 34, done.
Counting objects: 100% (34/34), done.
Compressing objects: 100% (22/22), done.
Total 34 (delta 16), reused 21 (delta 8), pack-reused 0
copied 33 pack entries33/34
generating index: 33/34
`

@QAbot-zh
Copy link

QAbot-zh commented Oct 5, 2023

  1. 卸载是因为某些库的版本跟requirement不匹配,所以会卸载旧版本,安装指定版本。
  2. 连接不上http,你是否运行wechat-dll-injectorV1.0.3.exe注入dll了?
  3. 看到你是直接用的系统环境的python,不是很推荐这种做法,可以学习下conda虚拟环境,当然只是一个建议,本条不影响程序运行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants