geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
41.33k stars 4.93k forks source link

Exception: Connection Error #1346

Open amd-srautmar opened 2 weeks ago

amd-srautmar commented 2 weeks ago

Bug description Trying to run the command, getting Connection error

python software_company.py "Write a cli snake game"

Getting following error:

2024-06-13 12:01:39.113 | ERROR | metagpt.utils.common:log_it:554 - Finished call to 'metagpt.actions.action_node.ActionNode._aask_v1' after 182.188(s), this was the 5th time calling it. exp: Connection error. 2024-06-13 12:01:46.576 | WARNING | tenacity.after:log_it:44 - Finished call to 'metagpt.provider.openai_api.OpenAILLM.acompletion_text' after 3.594(s), this was the 1st time calling it. 2024-06-13 12:01:51.132 | WARNING | tenacity.after:log_it:44 - Finished call to 'metagpt.provider.openai_api.OpenAILLM.acompletion_text' after 8.157(s), this was the 2nd time calling it. 2024-06-13 12:01:55.013 | WARNING | tenacity.after:log_it:44 - Finished call to 'metagpt.provider.openai_api.OpenAILLM.acompletion_text' after 12.032(s), this was the 3rd time calling it. 2024-06-13 12:01:58.715 | WARNING | tenacity.after:log_it:44 - Finished call to 'metagpt.provider.openai_api.OpenAILLM.acompletion_text' after 15.735(s), this was the 4th time calling it. 2024-06-13 12:02:06.740 | WARNING | tenacity.after:log_it:44 - Finished call to 'metagpt.provider.openai_api.OpenAILLM.acompletion_text' after 23.766(s), this was the 5th time calling it. 2024-06-13 12:02:13.240 | WARNING | tenacity.after:log_it:44 - Finished call to 'metagpt.provider.openai_api.OpenAILLM.acompletion_text' after 30.266(s), this was the 6th time calling it. 2024-06-13 12:02:13.241 | ERROR | metagpt.utils.common:log_and_reraise:818 - Retry attempts exhausted. Last exception: Connection error. 2024-06-13 12:02:13.242 | WARNING | metagpt.utils.common:log_and_reraise:819 - Recommend going to https://deepwisdom.feishu.cn/wiki/MsGnwQBjiif9c3koSJNcYaoSnu4#part-XdatdVlhEojeAfxaaEZcMV3ZniQ See FAQ 5.8

2024-06-13 12:02:13.244 | ERROR | metagpt.utils.common:log_it:554 - Finished call to 'metagpt.actions.action_node.ActionNode._aask_v1' after 216.313(s), this was the 6th time calling it. exp: Connection error. 2024-06-13 12:02:13.245 | WARNING | metagpt.utils.common:wrapper:649 - There is a exception in role's execution, in order to resume, we delete the newest role communication message in the role's memory. 2024-06-13 12:02:13.251 | ERROR | metagpt.utils.common:wrapper:631 - Exception occurs, start to serialize the project, exp: Traceback (most recent call last): File "\new_meta_env\Lib\site-packages\openai_base_client.py", line 1522, in _request response = await self._client.send( ^^^^^^^^^^^^^^^^^^^^^^^^ File "\new_meta_env\Lib\site-packages\httpx_client.py", line 1661, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)

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

Traceback (most recent call last): File "\new_meta_env\Lib\site-packages\metagpt-0.8.1-py3.11.egg\metagpt\utils\common.py", line 626, in wrapper result = await func(self, *args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "\new_meta_env\Lib\site-packages\metagpt-0.8.1-py3.11.egg\metagpt\team.py", line 131, in run await self.env.run() openai.APIConnectionError: Connection error.**

voidking commented 2 weeks ago

Network problem. You can refer to https://deepwisdom.feishu.cn/wiki/MsGnwQBjiif9c3koSJNcYaoSnu4#part-XdatdVlhEojeAfxaaEZcMV3ZniQ

amd-srautmar commented 1 week ago

Thank you! I checked the network, its not a network issue. Same error still there. Its also showing ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] . Is there any way where I can set ssl_verify=False in code. Please guide me on this.

voidking commented 1 week ago

I see. Maybe the document could help you. https://stackoverflow.com/questions/50236117/scraping-ssl-certificate-verify-failed-error-for-http-en-wikipedia-org