MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

TypeError: __init__() takes 1 positional argument but 5 were given

Open Jonathan-Wei opened this issue 1 year ago • 3 comments

目前在做taks4到内容,代码是通过官方教程提供的,运行过程提示TypeError: init() takes 1 positional argument but 5 were given,具体日志如下:

(metagpt-spark) (base) ✘ weijiyonglover@MacBook-Pro-2  ~/aigc/metagpt/MetaGPT/metagpt  ↰ main ±  /opt/anaconda3/envs/metagpt-spark/bin/python /Users/weijiyonglover/aigc/metagpt/MetaGPT/metagpt/main.py 2024-02-01 20:18:49.624 | INFO | metagpt.const:get_metagpt_package_root:32 - Package root set to /Users/weijiyonglover/aigc/metagpt/MetaGPT 2024-02-01 20:18:49.825 | INFO | metagpt.config:get_default_llm_provider_enum:126 - API: LLMProviderEnum.SPARK Traceback (most recent call last): File "/Users/weijiyonglover/aigc/metagpt/MetaGPT/metagpt/main.py", line 351, in fire.Fire(main) File "/opt/anaconda3/envs/metagpt-spark/lib/python3.9/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/opt/anaconda3/envs/metagpt-spark/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/opt/anaconda3/envs/metagpt-spark/lib/python3.9/site-packages/fire/core.py", line 679, in _CallAndUpdateTrace component = loop.run_until_complete(fn(*varargs, **kwargs)) File "/opt/anaconda3/envs/metagpt-spark/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/Users/weijiyonglover/aigc/metagpt/MetaGPT/metagpt/main.py", line 344, in main await runner.subscribe(OssWatcher(), GithubTrendingCronTrigger(spec), callback) File "/Users/weijiyonglover/aigc/metagpt/MetaGPT/metagpt/main.py", line 216, in init super().init(name, profile, goal, constraints) TypeError: init() takes 1 positional argument but 5 were given

Jonathan-Wei avatar Feb 01 '24 12:02 Jonathan-Wei

报错位置代码: image

image

Jonathan-Wei avatar Feb 02 '24 08:02 Jonathan-Wei

super.__init__(name=name, profile=profile,...)

better629 avatar Feb 05 '24 11:02 better629

是不是用了最新代码,教程是基于0.5.2版本,新版metagpt需要相应修改一下

shenchucheng avatar Feb 07 '24 12:02 shenchucheng