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

Update exception #1 #265

Closed
mel11691 opened this issue Sep 25, 2023 · 11 comments
Closed

Update exception #1 #265

mel11691 opened this issue Sep 25, 2023 · 11 comments
Labels
question Further information is requested

Comments

@mel11691
Copy link

I had a problem where Aider wouldn't update my code until I put in a trivial change which allowed it to commit that change before it made it's own edits. This is probably because I committed some changes manually or something. I tried to fix this problem by deleting all my aider files in my workspace and deleting my manual ctags file in the workspace as well. Rerunning Aider didn't fix it, only my workaround by adding a letter to a comment fixed it.

I'm just curious why this happened, I'm a complete noobie and I'm using Chat GPT to help teach me how to code.

@paul-gauthier
Copy link
Collaborator

Thanks for trying aider!

Sorry, but I'm not sure I understand your question. Can you share a screenshot or some chat logs from .aider.chat.history.md that more clearly show the problem you are trying to describe?

@paul-gauthier paul-gauthier added the question Further information is requested label Sep 27, 2023
@mel11691
Copy link
Author

Screenshot 2023-09-28 143842

I would guess I committed a change manually and Aider thought it had to commit that previous change before makings it's edits. To fix it I made some trivial change and left it uncommitted, which Aider then committed, and then proceeded to make it's actual edits.

@paul-gauthier
Copy link
Collaborator

Are you using aider directly or via some other tool? The output in your screenshot contains things that aider doesn't output and is missing other things that aider does output (like the actual Update Exception).

@mel11691
Copy link
Author

I'm using the console in VSC

@paul-gauthier
Copy link
Collaborator

I'm finding it hard to understand what is going on here. When I run aider inside a VS Code terminal window, it looks nothing like your screenshot. It is the standard aider colors, without line numbering on the left column and without special highlighting and notations on the >>> HEAD and <<< updated lines. Etc.

Whatever environment you are using is somehow not outputting the actual "update exception" details, which aider emits using a standard print() call.

Are you running aider from the command line inside a VS Code terminal window? Can you should me the invocation along with the aider version and other information it prints at launch?

@mel11691
Copy link
Author

I took a screenshot of the .aider.chat.history.md file in VSC. I'm not sure of how to get the chat history in the terminal. I have used /clear a bunch of times since then, if that matters.

@paul-gauthier
Copy link
Collaborator

Can you show me the status lines that aider prints when you initially launch it? They should look something like this:

$ aider
Aider v0.14.1-dev
Model: gpt-4
Git repo: .git
Repo-map: universal-ctags using 1024 tokens
Use /help to see in-chat commands, run with --help to see cmd line args

@mel11691
Copy link
Author

Screenshot 2023-09-30 131446

I just got the update notification so I'll update to the latest, but I did have the problem on 0.14.0.

@mel11691
Copy link
Author

mel11691 commented Oct 2, 2023

I think it has something to do with the working branch of the code, which is something I don't really understand. Like i said I'm very green. When I opened VSC I had a working branch of my file open for some reason I'm not sure of and just my file as is open. I xed out of my working branch and made some changes to my files including the file aider needed to make changes to. I again got an update exception #1. I think Aider wants to commit some change from the working branch, but can't. I'm not really sure.

@paul-gauthier
Copy link
Collaborator

Thanks for the additional information. I see why your output looked different than what I was expecting. You were sharing a screenshot of the .aider.chat.history.md file opened up in a VS Code editor window.

Unfortunately, the actual "update exception" information isn't logged to that file. Next time you see it happen live in your VS Code terminal, see if you can grab a screenshot of that.

That said, GPT-4 sometimes messes up no matter how strongly aider prompts it. If you get repeated updated exceptions, it can help to /clear old conversation history and to only /add the files that are needed for the specific change you are working on (and not a bunch of unrelated files). This helps GPT focus on your task.

@paul-gauthier
Copy link
Collaborator

I'm going to close this issue for now, but feel free to re-open or file a new issue any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants