MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

AttributeError: module 'httpcore' has no attribute 'CloseError'

Open pranavvr-lumiq opened this issue 2 years ago • 5 comments

I have successfully cloned the repo, run the installation and done all the steps for a traditional installation. However, I am stuck on this one problem when I try to run python startup.py "Write a cli snake game".

Traceback (most recent call last): File "/home/pranav/LUMIQ/Text Generation/metagpt/metagpt/startup.py", line 7, in from metagpt.roles import Architect, Engineer, ProductManager, ProjectManager, QaEngineer File "/home/pranav/LUMIQ/Text Generation/metagpt/metagpt/metagpt/roles/init.py", line 9, in from metagpt.roles.role import Role File "/home/pranav/LUMIQ/Text Generation/metagpt/metagpt/metagpt/roles/role.py", line 16, in from metagpt.actions import Action, ActionOutput File "/home/pranav/LUMIQ/Text Generation/metagpt/metagpt/metagpt/actions/init.py", line 10, in from metagpt.actions.action import Action File "/home/pranav/LUMIQ/Text Generation/metagpt/metagpt/metagpt/actions/action.py", line 14, in from metagpt.llm import LLM File "/home/pranav/LUMIQ/Text Generation/metagpt/metagpt/metagpt/llm.py", line 9, in from metagpt.provider.anthropic_api import Claude2 as Claude File "/home/pranav/LUMIQ/Text Generation/metagpt/metagpt/metagpt/provider/anthropic_api.py", line 9, in import anthropic File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/anthropic-0.3.6-py3.10.egg/anthropic/init.py", line 3, in from . import types File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/anthropic-0.3.6-py3.10.egg/anthropic/types/init.py", line 5, in from .completion import Completion as Completion File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/anthropic-0.3.6-py3.10.egg/anthropic/types/completion.py", line 3, in from .._models import BaseModel File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/anthropic-0.3.6-py3.10.egg/anthropic/_models.py", line 15, in from ._types import ( File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/anthropic-0.3.6-py3.10.egg/anthropic/_types.py", line 19, in import httpx File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/httpx-1.0.0b0-py3.10.egg/httpx/init.py", line 2, in from ._api import delete, get, head, options, patch, post, put, request, stream File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/httpx-1.0.0b0-py3.10.egg/httpx/_api.py", line 4, in from ._client import Client File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/httpx-1.0.0b0-py3.10.egg/httpx/_client.py", line 30, in from ._transports.default import AsyncHTTPTransport, HTTPTransport File "/home/pranav/anaconda3/envs/metaGPT/lib/python3.10/site-packages/httpx-1.0.0b0-py3.10.egg/httpx/_transports/default.py", line 92, in httpcore.CloseError: CloseError, AttributeError: module 'httpcore' has no attribute 'CloseError'

pranavvr-lumiq avatar Aug 22 '23 06:08 pranavvr-lumiq

Try to use python3.9.x

voidking avatar Aug 24 '23 11:08 voidking

I was able to resolve a similar (maybe the same) issue by forcing an install of an earlier version of httpcore.

pip install "httpcore<0.14"

mbulling83 avatar Aug 31 '23 19:08 mbulling83

@mbulling83 it is showing the same error

Anish2802 avatar Oct 21 '23 12:10 Anish2802

please any solution ?

Dubeyji1233 avatar Oct 26 '23 15:10 Dubeyji1233

pip install -U httpcore httpx

python 3.10

ip-rw avatar Dec 07 '23 02:12 ip-rw