Skip to content
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

Failed to update new codes from gpte #1197

Closed
zandboxfinance opened this issue Jul 29, 2024 · 3 comments · Fixed by #1198
Closed

Failed to update new codes from gpte #1197

zandboxfinance opened this issue Jul 29, 2024 · 3 comments · Fixed by #1198
Assignees
Labels
bug Something isn't working

Comments

@zandboxfinance
Copy link

zandboxfinance commented Jul 29, 2024

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

@zandboxfinance zandboxfinance added bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. labels Jul 29, 2024
@similato87
Copy link
Collaborator

@zandboxfinance Thank you for uploading the log file and providing all the necessary information to help us improve our project. We appreciate your time. We will look into this issue promptly. As soon as we identify the problem, we will create a hotfix to resolve it.

@similato87 similato87 removed the triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. label Aug 3, 2024
@similato87 similato87 self-assigned this Aug 3, 2024
@similato87 similato87 linked a pull request Aug 5, 2024 that will close this issue
@similato87
Copy link
Collaborator

@zandboxfinance Thank you for raising this issue and providing detailed information. Your input was invaluable in helping us locate the problem quickly and efficiently.

I’m pleased to inform you that the problem has been fixed. We will notify you once the fix in PR #1198 has been merged.

Additionally, we have deleted the log file you uploaded to protect your privacy.

Thanks again for your contribution!

@zandboxfinance
Copy link
Author

Thanks, after you merge the PR, I'll test again on my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants