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

any idea what I am doing wrong here ? #21

Closed
dolev765 opened this issue Jul 7, 2023 · 10 comments
Closed

any idea what I am doing wrong here ? #21

dolev765 opened this issue Jul 7, 2023 · 10 comments

Comments

@dolev765
Copy link

dolev765 commented Jul 7, 2023

python startup.py "Write a cli lightning game game which teaches you how lightning works with interactive gameplay"
2023-07-07 19:32:24.269 | INFO | metagpt.config:init:43 - Config loading done.
Traceback (most recent call last):
File "C:\Windows\System32\metagpt\startup.py", line 5, in
from metagpt.software_company import SoftwareCompany
File "C:\Windows\System32\metagpt\metagpt\software_company.py", line 10, in
from metagpt.config import CONFIG
File "C:\Windows\System32\metagpt\metagpt\config.py", line 91, in
CONFIG = Config()
File "C:\Windows\System32\metagpt\metagpt\utils\singleton.py", line 21, in call
cls._instances[cls] = super(Singleton, cls).call(*args, **kwargs)
File "C:\Windows\System32\metagpt\metagpt\config.py", line 46, in init
raise NotConfiguredException("Set OPENAI_API_KEY first")
metagpt.config.NotConfiguredException: Set OPENAI_API_KEY first

@zehuiya
Copy link

zehuiya commented Jul 8, 2023

The error occurred due to the absence of configuration for the OPENAI_API_KEY in your code program.

@dolev765
Copy link
Author

dolev765 commented Jul 8, 2023

The error occurred due to the absence of configuration for the OPENAI_API_KEY in your code program.

Which code should i fill out which I haven't. i filled (config.py, key.yaml, config.yaml), and does it work on powershell?

@dolev765
Copy link
Author

dolev765 commented Jul 8, 2023

self.openai_api_key = self._get('catto_key_censored')
if not self.openai_api_key or 'YOUR_API_KEY' == self.openai_api_key:
raise NotConfiguredException("Set OPENAI_API_KEY first")
self.openai_api_base = self._get('https://api.cattto.repl.co/v1')
if not self.openai_api_base or 'YOUR_API_BASE' == self.openai_api_base:
logger.info("Set OPENAI_API_BASE in case of network issues")
any thing I missed here?

@geekan
Copy link
Owner

geekan commented Jul 8, 2023

Could you provide the full paths of the config files?

And maybe you could try to set up the vars in env.

@dolev765
Copy link
Author

dolev765 commented Jul 8, 2023

@geekan kk just a sec

@dolev765
Copy link
Author

dolev765 commented Jul 8, 2023

Hey sorry for the annoyance before I asked my roomate for help he got stuck and just wrote a request but he forgot to setup a venv so I came setup the venv and the rest of the stuff now I get this error : (metagpt) PS C:\Users\dolev\metagpt> python startup.py "Write a cli snake game"
Traceback (most recent call last):
File "C:\Users\dolev\metagpt\startup.py", line 5, in
from metagpt.software_company import SoftwareCompany
File "C:\Users\dolev\metagpt\metagpt\software_company.py", line 10, in
from metagpt.config import CONFIG
File "C:\Users\dolev\metagpt\metagpt\config.py", line 13, in
from metagpt.utils.singleton import Singleton
File "C:\Users\dolev\metagpt\metagpt\utils_init_.py", line 10, in
from metagpt.utils.read_document import read_docx
File "C:\Users\dolev\metagpt\metagpt\utils\read_document.py", line 9, in
import docx
File "C:\Users\dolev\metagpt\lib\site-packages\docx.py", line 30, in
from exceptions import PendingDeprecationWarning
ModuleNotFoundError: No module named 'exceptions'

@dolev765 dolev765 closed this as completed Jul 9, 2023
iorisa referenced this issue in iorisa/MetaGPT Sep 4, 2023
@MARYAMJAHANIR
Copy link

hey @dolev765 @geekan can you pls help me, actually i am unable to resolve this error and i don't know exactly where i made the mistake the error is:
(metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main$ cd metagpt
(metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$ python startup.py
2023-12-22 05:23:23.390 | INFO | metagpt.const:get_metagpt_package_root:32 - Package root set to /mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt
Traceback (most recent call last):
File "/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt/startup.py", line 8, in
from metagpt.config import CONFIG
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 230, in
CONFIG = Config()
^^^^^^^^
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/utils/singleton.py", line 21, in call
cls._instances[cls] = super(Singleton, cls).call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 70, in init
self._update()
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 106, in _update
_ = self.get_default_llm_provider_enum()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 90, in get_default_llm_provider_enum
raise NotConfiguredException("You should config a LLM configuration first")
metagpt.config.NotConfiguredException: You should config a LLM configuration first
(metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$

@Hoanganhvu123
Copy link

same, so how can i fix it

@monjoes
Copy link

monjoes commented Jan 3, 2024

hey @dolev765 @geekan can you pls help me, actually i am unable to resolve this error and i don't know exactly where i made the mistake the error is: (metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main$ cd metagpt (metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$ python startup.py 2023-12-22 05:23:23.390 | INFO | metagpt.const:get_metagpt_package_root:32 - Package root set to /mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt Traceback (most recent call last): File "/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt/startup.py", line 8, in from metagpt.config import CONFIG File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 230, in CONFIG = Config() ^^^^^^^^ File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/utils/singleton.py", line 21, in call cls._instances[cls] = super(Singleton, cls).call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 70, in init self._update() File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 106, in _update _ = self.get_default_llm_provider_enum() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 90, in get_default_llm_provider_enum raise NotConfiguredException("You should config a LLM configuration first") metagpt.config.NotConfiguredException: You should config a LLM configuration first (metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$

I have the same issue , were you able to fix it?

@lstuma
Copy link

lstuma commented May 24, 2024

anyone found a fix?

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

7 participants