-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Bug]: KeyError: 'user_feedback_qa' #1025
Comments
Same issue using repository except it happened without any inputs during code review. Restarting immediately fails again with the same message |
same here |
Seems to be working again after making this change to core/agents/code_monkey.py L60: if len(iterations) > 0:
if "description" in iterations[-1]:
instructions = iterations[-1]["description"]
if "user_feedback" in iterations[-1]:
user_feedback = iterations[-1]["user_feedback"]
if "user_feedback_qa" in iterations[-1]:
user_feedback_qa = iterations[-1]["user_feedback_qa"] |
Resolved., Similar resolution to @DaveTacker `from os.path import basename from pydantic import BaseModel, Field from core.agents.base import BaseAgent log = get_logger(name) class FileDescription(BaseModel): class CodeMonkey(BaseAgent):
` |
Here is the whole corrected code_monkey.py in gpt-pilot/core/agents from os.path import basename from pydantic import BaseModel, Field from core.agents.base import BaseAgent log = get_logger(name) class FileDescription(BaseModel): class CodeMonkey(BaseAgent):
|
`from os.path import basename log = get_logger(name) class FileDescription(BaseModel): class CodeMonkey(BaseAgent):
` This version of the CodeMonkey class ensures that the keys description, user_feedback, and user_feedback_qa are accessed safely using the get method, preventing KeyError exceptions if these keys are missing. |
This is strange because I had the same solution from chatgtp but it didn't work and even after copying your code still does not work. pythagora won't load the window to upload or create a new application. I wonder how its gonna be before the bug is ironed out. I have tried this in both windows 10 and 11. please help mybe am doing something wrong |
Is it exactly the same error?
…On Thu, Jun 27, 2024, 7:34 AM Philani ***@***.***> wrote:
This is strange because I had the same solution from chatgtp but it didn't
work and even after copying your code still does not work. pythagora won't
load the window to upload or create a new application. I wonder how its
gonna be before the bug is ironed out. I have tried this in both windows 10
and 11. please help mybe am doing something wrong
—
Reply to this email directly, view it on GitHub
<#1025 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHXDSJO22FHCZEH3XJOHK3ZJREJNAVCNFSM6AAAAABJSFIZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVGI4DKNBVGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
On the side note: I have realised that the errors are caused by skipping filling out .env variables. That means you have to have all the services set before you start coding and fillout all the required information, then you are good to go. I have not had those errors anymore. |
I had the same problem. How do you ensure to have all the services set before you start coding and fillout all the required information?? I have everything set up in .env and I still receive these errors. |
Version
VisualStudio Code extension
Operating System
Windows 10
What happened?
The text was updated successfully, but these errors were encountered: