Skip to content

Failed to update new codes from gpte #1197

@zandboxfinance

Description

@zandboxfinance

What I did

I create Java Spring Boot project with gpte first, and I want to separate application.yaml as two env config files, so I use below prompt to do gpte -i
"I want to seperate different environment, stage environment and local environment, current setting is for stage, so I need a new yaml config for local, and this local environment I want to use H2 DB. So yamle file will have two, and run.sh I also want two for different env"

Expected Behavior

I expect to have yaml files and run.sh file for both local and stage env.

Current Behavior

Error

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/gpt_engineer/core/default/steps.py", line 379, in handle_improve_mode
    files_dict = agent.improve(files_dict, prompt)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/gpt_engineer/applications/cli/cli_agent.py", line 208, in improve
    files_dict = self.improve_fn(
                 ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/gpt_engineer/core/default/steps.py", line 311, in improve_fn
    return _improve_loop(ai, files_dict, memory, messages)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/gpt_engineer/core/default/steps.py", line 318, in _improve_loop
    files_dict, errors = salvage_correct_hunks(messages, files_dict, memory)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/gpt_engineer/core/default/steps.py", line 351, in salvage_correct_hunks
    file_to_lines_dict(files_dict[diff.filename_pre])
                       ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'src/main/resources/application-stage.yml'

Failure Information

gpt-4o

Installation Method

python -m pip install gpt-engineer

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions