KeyError: 'main_prompt' problem with GPT Engineer
I am getting the following error:
My Input: python -m gpt_engineer.main example My OS: Windows11 Python version: 3.11.4 pip version: 23.1.2
File "
File "
File "C:\Users\Saikat\gpt-engineer\gpt_engineer\main.py", line 65, in
File "C:\Users\Saikat\gpt-engineer\gpt_engineer\main.py", line 60, in main messages = step(ai, dbs) ^^^^^^^^^^^^^
File "C:\Users\Saikat\gpt-engineer\gpt_engineer\steps.py", line 37, in clarify user = dbs.input["main_prompt"] ~~~~~~~~~^^^^^^^^^^^^^^^
File "C:\Users\Saikat\gpt-engineer\gpt_engineer\db.py", line 21, in getitem raise KeyError(key)
KeyError: 'main_prompt'
The example folder should exist and in it should there be a main_prompt file. Its gives you that error when you feed it a file that does not exist.
I had the same problem trying to build the project also. What I did was move the project out of the projects folder as a temporary solution. I still can't get the built projects to run. any suggestions is welcomed.
For some weird reason it works if you name the file 'main_prompt' instead of 'prompt'.
I'm having the same issue. It worked 45 minutes ago. Something happened and where one used to say main_prompt it now looks like this (after execution of "cp -r projects/example/ projects/my-new-project"}
. Changing the filename appears to work but the result ends up with an error. I forgot to make note of the name/contents of the error I will run it again and edit this post with those details.
Edit. i have two tracebacks. one shows what happens when the file is named "prompt" the other "main_prompt". there was a hang in the middle of the main_prompt attempt. youll see in the traceback where this happened. Tracebacks here: https://justpaste.it/cihuu
I think I may have solved this problem and it comes down to an "s" on the end of "project". The example has the singular yet the path to main_prompt is this plural, "projects"!
I am very new to all this stuff, but tonight I decided to check for gpt-engineer updates, pulled the latest, and suddenly started having this problem too.
Looks like Installing gpt-engineer now results in /example/prompt being created instead of the former /example/main_prompt, so it fails to start. As said, manually correcting the file to main_prompt allows it to run, but obviously the real fix is somewhere deep in the code and way above my ability.
I am very new to all this stuff, but tonight I decided to check for gpt-engineer updates, pulled the latest, and suddenly started having this problem too.
Looks like Installing gpt-engineer now results in /example/prompt being created instead of the former /example/main_prompt, so it fails to start. As said, manually correcting the file to main_prompt allows it to run, but obviously the real fix is somewhere deep in the code and way above my ability.
Were you able to complete a full run without error by changing it to main_prompt? Mine would start but eventually fail
For me I obtained that error when I didn't create the virtual environment properly. Try running source venv/bin/activate after make install?
There was a bug on main. Should not happen!
It's fixed now, let's make sure it doesn't happen again.
Closing now, please immediately open a new issue if this is not fix still!