You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running GPT Engineer in improve mode. After successfully writing some code and making some improvements to the code, GPT Engineer is no longer able to make edits to the code. It starts writing the updated code in CMD but in inevitably always terminates in error and none of the code changes take effect.
I am trying to understand why this error occurs so GPT Engineer can finish updating the code to files.
After seeing a lot of files being updated in the console I get the following error and it terminates without applying any edits:
These changes implement the requested functionality. The `myMethodName` method now accepts a list of XXX... The `Main` class has been updated to pass the correct parameters and format the output as requested. The `CoResult` class is a new addition to store and format . Lastly, the `CoUtil` class is a utility to generate...Traceback (most recent call last):
File "C:\Users\XDX\AppData\Local\pypoetry\Cache\virtualenvs\gpt-engineer-upNWTwXa-py3.11\Scripts\\gpte", line 6, in <module>
sys.exit(app())
^^^^^
File "C:\Agents\gpt-engineer\gpt_engineer\applications\cli\main.py", line 194, in main
files_dict = agent.improve(files_dict, prompt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Agents\gpt-engineer\gpt_engineer\applications\cli\cli_agent.py", line 132, in improve
files_dict = self.improve_fn(
^^^^^^^^^^^^^^^^
File "C:\Agents\gpt-engineer\gpt_engineer\core\default\steps.py", line 182, in improve
overwrite_code_with_edits(chat, files_dict)
File "C:\Agents\gpt-engineer\gpt_engineer\core\chat_to_files.py", line 97, in overwrite_code_with_edits
apply_edits(edits, files_dict)
File "C:\Agents\gpt-engineer\gpt_engineer\core\chat_to_files.py", line 185, in apply_edits
occurrences_cnt = files_dict[filename].count(edit.before)
~~~~~~~~~~^^^^^^^^^^
KeyError: 'src/MyJavaClass.java'
I've changed the class and method name. This error always surfaces but the "MyJavaClass" can change.
The text was updated successfully, but these errors were encountered:
aix10
added
bug
Something isn't working
triage
Interesting but stale issue. Will be close if inactive for 3 more days after label added.
labels
Dec 31, 2023
Unfortunately, the improve/edit syntax is not so powerful atm, which is why I've suggested an improvement in #869 .
Hopefully we will have this up soon. I'm closing this for now, but you report is helpful, since it emphasizes how important this is.
I'm running GPT Engineer in improve mode. After successfully writing some code and making some improvements to the code, GPT Engineer is no longer able to make edits to the code. It starts writing the updated code in CMD but in inevitably always terminates in error and none of the code changes take effect.
I am trying to understand why this error occurs so GPT Engineer can finish updating the code to files.
After seeing a lot of files being updated in the console I get the following error and it terminates without applying any edits:
I've changed the class and method name. This error always surfaces but the "MyJavaClass" can change.
@AntonOsika
What is causing this error and how to resolve?
The text was updated successfully, but these errors were encountered: