MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

pydantic_core._pydantic_core.ValidationError: 1 validation error for Config

Open loyalty-fox opened this issue 1 year ago • 3 comments
trafficstars

Bug description pip install metagpt后我尝试运行官方文档给的第一个例子,出现了如下报错:

image

Bug solved method

我尝试过降低pydantic版本到1.x但是又会出现其他的一些包不兼容的问题,请问有人知道问题出现在哪吗?

Screenshots or logs

出现问题的地方: image

loyalty-fox avatar Feb 21 '24 02:02 loyalty-fox

我在执行 metagpt --init-config 也报了这个错误,手动创建 /.metagpt/config2.yaml 后,正常使用。 @loyalty-fox

ref: https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html

jianzs avatar Feb 22 '24 08:02 jianzs

我在执行 metagpt --init-config 也报了这个错误,手动创建 /.metagpt/config2.yaml 后,正常使用。 @loyalty-fox

ref: https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html

感谢你的建议,之前我只是手动在目录下创建了config/config2.yaml 文件,没有执行metagpt --init-config 命令,执行了该命令之后,它自动在我的C:\Users\username下创建了你说的/.metagpt/config2.yaml ,然后就能正常运行程序了。 此外我是windows系统尝试执行这个项目的,不知道为什么需要在c盘下添加配置文件而不是项目当前目录下(我尝试直接把.metagpt文件整个从c盘迁移到项目路径下,会报与原来相同的错误)。

loyalty-fox avatar Feb 22 '24 09:02 loyalty-fox

open powershell and input "cd ~", and create the foloder and file manually. may this will solve your issue.

Jmengscode avatar Feb 23 '24 10:02 Jmengscode

This problem mainly comes from compatibility with pip installation users (they do not have this directory on the disk). But in fact you should also be able to configure config/config2.yaml directly.

geekan avatar Mar 21 '24 06:03 geekan