MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

any idea what I am doing wrong here ?

Open dolev765 opened this issue 1 year ago • 6 comments

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

dolev765 avatar Jul 07 '23 17:07 dolev765

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

zehuiya avatar Jul 08 '23 06:07 zehuiya

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 avatar Jul 08 '23 09:07 dolev765

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?

dolev765 avatar Jul 08 '23 09:07 dolev765

Could you provide the full paths of the config files?

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

geekan avatar Jul 08 '23 15:07 geekan

@geekan kk just a sec

dolev765 avatar Jul 08 '23 15:07 dolev765

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 avatar Jul 08 '23 15:07 dolev765

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$

MARYAMJAHANIR avatar Dec 22 '23 00:12 MARYAMJAHANIR

same, so how can i fix it

Hoanganhvu123 avatar Dec 24 '23 03:12 Hoanganhvu123

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?

monjoes avatar Jan 03 '24 18:01 monjoes

anyone found a fix?

lstuma avatar May 24 '24 23:05 lstuma