I have add the openai key to ~/.metagpt/config2.yaml
The software_company.py can run normally , however when I want to run minecraft, This error occured:
Traceback (most recent call last):
File "/data/safeagent/Minecraft/minecraft_run.py", line 7, in
from metagpt.roles.minecraft.curriculum_agent import CurriculumDesigner
File "/data/safeagent/Minecraft/metagpt/roles/init.py", line 9, in
from metagpt.roles.role import Role
File "/data/safeagent/Minecraft/metagpt/roles/role.py", line 15, in
from metagpt.config import CONFIG
File "/data/safeagent/Minecraft/metagpt/config.py", line 119, in
CONFIG = Config()
^^^^^^^^
File "/data/safeagent/Minecraft/metagpt/utils/singleton.py", line 21, in call
cls._instances[cls] = super(Singleton, cls).call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/safeagent/Minecraft/metagpt/config.py", line 51, in init
raise NotConfiguredException("Set OPENAI_API_KEY or Anthropic_API_KEY first")
metagpt.config.NotConfiguredException: Set OPENAI_API_KEY or Anthropic_API_KEY first
Based on the error message, minecraft_run is using config.yaml, not config2.yaml.