JSON error
Traceback (most recent call last):
File "/usr/local/bin/aider", line 8, in
Can anyone help with the issue above?
I have reinstalled and remade the CTAG's executable and currently blocked by this.
Thanks for trying aider! Sorry to hear you are having problems. I'm happy to try and help debug.
What output do you get if you run ctags --version from the command line?
You can also run aider without ctags, it is completely optional.
I run in the same issue. You need the -output--format=json be supported.
ctags --version doesn't output json support.
Any installation or build setup i tried on Ubuntu 22 doesnt seem to be getting it.
But looking at this https://github.com/universal-ctags/ctags/issues/2013
I found this:
sudo apt-get install libjansson-dev && ./autogen.sh && ./configure && make && sudo make install
And it seems to be working. (I assume you run into these errors on Linux)
Thanks for trying aider! Sorry to hear you are having problems. I'm happy to try and help debug.
What output do you get if you run
ctags --versionfrom the command line?You can also run aider without ctags, it is completely optional.
Universal Ctags 6.0.0(71851a4f), Copyright (C) 2015-2022 Universal Ctags Team Universal Ctags is derived from Exuberant Ctags. Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert Compiled: Jul 6 2023, 23:30:30 URL: https://ctags.io/ Output version: 0.0 Optional compiled features: +wildcards, +regex, +gnulib_regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc, +optscript
@coder-r I added logic to catch and report json errors when aider is parsing ctags output. If you install the latest from github you should get a clear error message showing you what was wrong with the json. If you have a chance to paste that here, I could help debug more.
aider Model: gpt-4 Git repo: .git Repo-map: universal-ctags using 1024 tokens Use /help to see in-chat commands. ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
what is this repo
/root/git/ctags/Tmain/input-encoding-option.d/input.java: 'utf-8' codec can't decode byte 0x83 in position 18: invalid start byte /root/git/ctags/Tmain/input-encoding-option.d/input.js: 'utf-8' codec can't decode byte 0xca in position 14: invalid continuation byte /root/git/ctags/Tmain/invalid-encoding-option.d/input.java: 'utf-8' codec can't decode byte 0x83 in position 18: invalid start byte /root/git/ctags/Tmain/invalid-encoding-option.d/input.js: 'utf-8' codec can't decode byte 0xca in position 14: invalid continuation byte /root/git/ctags/Tmain/no-input-encoding-option.d/input.java: 'utf-8' codec can't decode byte 0x83 in position 18: invalid start byte /root/git/ctags/Tmain/no-input-encoding-option.d/input.js: 'utf-8' codec can't decode byte 0xca in position 14: invalid continuation byte /root/git/ctags/Tmain/output-encoding-option.d/input.js: 'utf-8' codec can't decode byte 0xca in position 14: invalid continuation byte /root/git/ctags/Tmain/output-encoding-option.d/tags-expected.txt: 'utf-8' codec can't decode byte 0x83 in position 573: invalid start byte /root/git/ctags/Tmain/pattern-length-limit.d/input-iso-8859-1.py: 'utf-8' codec can't decode byte 0x80 in position 144: invalid start byte /root/git/ctags/Tmain/pattern-length-limit.d/stdout-expected.txt: 'utf-8' codec can't decode byte 0x80 in position 759: invalid start byte
thanks again for helping. I tried a command such as what is this repo and its the same for any repo I do this too. On another note how do I disable ctags from being used in aider?
Ok, looks like ctags is returning non-utf-8 encodings, presumably because your files are using some other encoding?
I just pushed a change, which tells ctags to always output utf-8. If you know the encoding of your files, you should run aider with --encoding xxx to tell it.
Maybe --encoding cp1252 or --encoding latin1 ?
Are you on Windows?
Using Ubuntu in WSL.
Is there any way of getting a verbose output when you ask something like "what is this repo" and its thinking.
Your recent fix seems to have worked though! Thank you!
I'm glad to hear that solved your problem.
As far as getting more information, you can just ask more questions to GPT. Ask it to tell you more about the code base you're looking at. You can also ask it if there are particular files it would like to see in order to understand things better.
Finally, you can run aider with --verbose, and that will show you a bunch of debug information. But you're already seeing everything that GPT is writing, so I'm not sure that's what you want to do.
I'm going to close this issue for now, but feel free to re-open or file a new issue if you have any further problems.