Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'NoneType' object is not iterable #1583

Open
baronbigghf opened this issue Nov 8, 2024 · 2 comments
Open

TypeError: 'NoneType' object is not iterable #1583

baronbigghf opened this issue Nov 8, 2024 · 2 comments
Assignees

Comments

@baronbigghf
Copy link

baronbigghf commented Nov 8, 2024

Hi ,
I just installed MetaGpt on ubuntu20, and config LLM through modified ./config/congfig2.yaml;

then executed example , logs info below :
pydantic_core._pydantic_core.ValidationError: 1 validation error for Config
llm.api_key
Value error, Please set your API key in /home/*****/.metagpt/config2.yaml. If you also set your config in /data2/11_metadata/MetaGPT/config/config2.yaml,
the former will overwrite the latter. This may cause unexpected result.
[type=value_error, input_value='YOUR_API_KEY', input_type=str]
For further information visit https://errors.pydantic.dev/2.9/v/value_error

so ,I Erased /home/*/.metagpt/config2.yaml ,executed agant, Error info like below:
Feature description
$ python examples/di/data_visualization.py
2024-11-08 11:28:52.046 | INFO | metagpt.const:get_metagpt_package_root:21 - Package root set to /data2/11_metadata/MetaGPT
Traceback (most recent call last):
File "/data2/11_metadata/MetaGPT/examples/di/data_visualization.py", line 4, in
from metagpt.roles.di.data_interpreter import DataInterpreter
File "/data2/11_metadata/MetaGPT/metagpt/roles/init.py", line 9, in
from metagpt.roles.role import Role
File "/data2/11_metadata/MetaGPT/metagpt/roles/role.py", line 30, in
from metagpt.actions import Action, ActionOutput
File "/data2/11_metadata/MetaGPT/metagpt/actions/init.py", line 10, in
from metagpt.actions.action import Action
File "/data2/11_metadata/MetaGPT/metagpt/actions/action.py", line 15, in
from metagpt.actions.action_node import ActionNode
File "/data2/11_metadata/MetaGPT/metagpt/actions/action_node.py", line 22, in
from metagpt.llm import BaseLLM
File "/data2/11_metadata/MetaGPT/metagpt/llm.py", line 11, in
from metagpt.context import Context
File "/data2/11_metadata/MetaGPT/metagpt/context.py", line 14, in
from metagpt.config2 import Config
File "/data2/11_metadata/MetaGPT/metagpt/config2.py", line 169, in
config = Config.default()
^^^^^^^^^^^^^^^^
File "/data2/11_metadata/MetaGPT/metagpt/config2.py", line 110, in default
final = merge_dict(dicts)
^^^^^^^^^^^^^^^^^
File "/data2/11_metadata/MetaGPT/metagpt/config2.py", line 165, in merge_dict
result.update(dictionary)
### TypeError: 'NoneType' object is not iterable
Your Feature

@voidking voidking self-assigned this Nov 9, 2024
@voidking
Copy link
Collaborator

How is config2.yaml configured?

@baronbigghf
Copy link
Author

baronbigghf commented Nov 18, 2024

How is config2.yaml configured?

thank you vidking. I used conifg file under /home , erased ./config/congfig2.yaml, then it run ok . but not mind the reason .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants