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

Editing a project: KeyError "src/index.js" #1166

Open
flotos opened this issue Jun 6, 2024 · 1 comment
Open

Editing a project: KeyError "src/index.js" #1166

flotos opened this issue Jun 6, 2024 · 1 comment
Labels
bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added.

Comments

@flotos
Copy link

flotos commented Jun 6, 2024

Policy and info

  • Maintainers will close issues that have been stale for 14 days if they contain relevant answers.
  • Adding the label "sweep" will automatically turn the issue into a coded pull request. Works best for mechanical tasks. More info/syntax at: https://docs.sweep.dev/

Expected Behavior

When I run my script on a new project it didn't create any file. I have thus tried to edit a basic project with gpte ..\node-game2\ --model gpt-4o -i.

The expected behavior should edit the existing files.

Current Behavior

No files are edited and I receive an error prompting to post here the logs

Failure Information

This concludes a fully working implementation.Error while improving the project: 'src/index.js'
Could you please upload the debug_log_file.txt in D:\creations\gpt-engineer\..\node-game2\.gpteng\memory/logs folder to github?
FULL STACK TRACE:

Traceback (most recent call last):
  File "D:\creations\gpt-engineer\gpt_engineer\core\default\steps.py", line 379, in handle_improve_mode
    files_dict = agent.improve(files_dict, prompt)
  File "D:\creations\gpt-engineer\gpt_engineer\applications\cli\cli_agent.py", line 208, in improve
    files_dict = self.improve_fn(
  File "D:\creations\gpt-engineer\gpt_engineer\core\default\steps.py", line 311, in improve_fn
    return _improve_loop(ai, files_dict, memory, messages)
  File "D:\creations\gpt-engineer\gpt_engineer\core\default\steps.py", line 318, in _improve_loop
    files_dict, errors = salvage_correct_hunks(messages, files_dict, memory)
  File "D:\creations\gpt-engineer\gpt_engineer\core\default\steps.py", line 351, in salvage_correct_hunks
    file_to_lines_dict(files_dict[diff.filename_pre])
KeyError: 'src/index.js'

Failure Logs

debug_log_file.txt

I have tried using the pip package, this repository at commit 5f9d7ac, using powershell and also git Bash terminal.

One thing I notice is that the path "/" is different with windows's "" maybe, from the log below ?

This concludes a fully working implementation.Error while improving the project: 'src/index.js'
Could you please upload the debug_log_file.txt in D:\creations\gpt-engineer\..\node-game2\.gpteng\memory/logs

Seeing the relative path "breaking" the shown path, I also tried before using a correct path (not going up one folder) and that didn't work either.

@flotos flotos added bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. labels Jun 6, 2024
@captivus
Copy link
Collaborator

captivus commented Jun 7, 2024

Please see comments on your other issue here and let us know. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added.
Projects
None yet
Development

No branches or pull requests

2 participants