MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

TypeError: dataclass() got an unexpected keyword argument 'slots'

Open lori-kuo opened this issue 9 months ago • 3 comments

Bug description metagpt --init-config then

Traceback (most recent call last):
  File "/home/azureuser/anaconda3/envs/metagpt/bin/metagpt", line 5, in <module>
    from metagpt.software_company import app
  File "/home/azureuser/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/software_company.py", line 7, in <module>
    import agentops
  File "/home/azureuser/anaconda3/envs/metagpt/lib/python3.9/site-packages/agentops/__init__.py", line 5, in <module>
    from .client import Client
  File "/home/azureuser/anaconda3/envs/metagpt/lib/python3.9/site-packages/agentops/client/__init__.py", line 1, in <module>
    from .client import Client
  File "/home/azureuser/anaconda3/envs/metagpt/lib/python3.9/site-packages/agentops/client/client.py", line 4, in <module>
    from agentops.config import Config
  File "/home/azureuser/anaconda3/envs/metagpt/lib/python3.9/site-packages/agentops/config.py", line 35, in <module>
    @dataclass(slots=True)
TypeError: dataclass() got an unexpected keyword argument 'slots'

Environment information

ubuntu 22.04 python 3.9

lori-kuo avatar Mar 15 '25 06:03 lori-kuo

the same problem here

PandaraWen avatar Mar 15 '25 15:03 PandaraWen

@lori-kuo @PandaraWen I faced the same. A quick chat with GH Copilot revealed the issue and solution use python 3.10

i-m-addycoder avatar Mar 16 '25 14:03 i-m-addycoder

the same issue here

smurata3310 avatar Apr 12 '25 01:04 smurata3310

This issue has no activity in the past 30 days. Please comment on the issue if you have anything to add.

github-actions[bot] avatar May 18 '25 00:05 github-actions[bot]

the same issue here

lihuixian001 avatar May 22 '25 13:05 lihuixian001

最后通过源码安装方式解决(python 3.10) git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .

lihuixian001 avatar May 22 '25 15:05 lihuixian001

This issue has no activity in the past 30 days. Please comment on the issue if you have anything to add.

github-actions[bot] avatar Jun 23 '25 00:06 github-actions[bot]

This issue was closed due to 45 days of inactivity. If you feel this issue is still relevant, please reopen the issue to continue the discussion.

github-actions[bot] avatar Jul 07 '25 00:07 github-actions[bot]