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

Exception: No files were selected. Please select at least one file to proceed. when i use improve mode #1087

Closed
zhoumzh opened this issue Mar 25, 2024 · 3 comments
Labels
bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added.

Comments

@zhoumzh
Copy link

zhoumzh commented Mar 25, 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

i use new code mode generate a snake game with "projects/example" workspace
when i run it ,it throws a problem,then i want to use improve mode to fix this bug.
with command "gpte projects/example -i" then it throw below errros:
Please select and deselect (add # in front) files, save it, and close it to continue...
write: /Users/zhoumingzhu/projects/python/gpt-engineer/projects/example/.gpteng/file_selection.toml is not logged in
Traceback (most recent call last):

File "/Users/zhoumingzhu/Library/Caches/pypoetry/virtualenvs/gpt-engineer-LPkntHwg-py3.12/bin/gpte", line 6, in
sys.exit(app())
^^^^^

File "/Users/zhoumingzhu/projects/python/gpt-engineer/gpt_engineer/applications/cli/main.py", line 447, in main
files_dict_before = FileSelector(project_path).ask_for_files()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/zhoumingzhu/projects/python/gpt-engineer/gpt_engineer/applications/cli/file_selector.py", line 98, in ask_for_files
selected_files = self.editor_file_selector(self.project_path, False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/zhoumingzhu/projects/python/gpt-engineer/gpt_engineer/applications/cli/file_selector.py", line 189, in editor_file_selector
return self.get_files_from_toml(
^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/zhoumingzhu/projects/python/gpt-engineer/gpt_engineer/applications/cli/file_selector.py", line 284, in get_files_from_toml
raise Exception(

Exception: No files were selected. Please select at least one file to proceed.

Current Behavior

What is the current behavior?

Failure Information

Information about the failure, including environment details, such as LLM used.

Failure Logs

If your project includes a debug_log_file.txt, kindly upload it from your_project/.gpteng/memory/ directory. This file encompasses all the necessary logs. Should the file prove extensive, consider utilizing GitHub's "add files" functionality.

@zhoumzh zhoumzh added bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. labels Mar 25, 2024
@viborc
Copy link
Collaborator

viborc commented Mar 25, 2024

@similato87 can you please take a look into this?

@similato87
Copy link
Collaborator

Hi @zhoumzh,

Thank you for bringing this issue to our attention and for providing detailed information. The error you're encountering is due to no files being selected for the improvement process. In the improve mode, GPT-Engineer requires users to select the code files that need to be processed by LLMs. This selection is done in your default text editor, which should open automatically for you to choose files by removing the # in front of their names, thus marking them as selected.

By default, all files are unselected (prefixed with #). It's possible that the text editor window was overlooked, or the necessary modifications to remove the # were not made for the files you intended to include.

As an illustration, let's consider the default example-improve scenario in our project. If you wish to select "control.py" and "main.py" for improvement, you would need to remove the # from in front of these two filenames, save the changes, and then close the editor. Below is a screenshot showing how it looks after the files have been selected and saved in Notepad.

image

I hope this clarifies the situation and helps you proceed with the improvement process.

@zhoumzh
Copy link
Author

zhoumzh commented Mar 26, 2024

@similato87 thanks for your replay. i knowed the questions. but ,i find Another question, and will to creat a new Issues.

@viborc viborc closed this as completed Mar 28, 2024
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

3 participants