Hi, I tried to run your project using Windows 11 Powershell 7.4 and ran into various issues. I was able to debug some of them, so I thought I'd jot down the steps I took:
1) pipx run --spec codeqai codeqai configure
This didn't work for me, the setup launched but Codeqai was unavailable after. (My understanding of pipx run
is that it's a temporary, run-once sandbox venv only.)
pipx install codeqai
, followed by codeqai configure
worked instead.
2) UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1137: character maps to
Whenever you're using open(), I believe you should add encoding='utf-8'
. This solves this issue.
For example: with open(env_path, "w", encoding='utf-8') as env_f:
in app.py.
3) Command '['C:\\Users\\<USER>\\.local\\pipx\\venvs\\codeqai\\Scripts\\python.exe', '-m', 'pip', 'install', 'faiss-gpu (Only if your system supports CUDA))']' returned non-zero exit status 1.
Unless I'm mistaken, on line 170 of vector_store.py, you're passing the literal string faiss-gpu (Only if your system supports CUDA)
to pip install. You'd want fiass-gpu
instead. However, I still couldn't install fiass-gpu as it returned a no compatible packages error. fiass-cpu worked fine.
4) When I reran codeqai search/sync/etc I get "IndexError: list index out of range". in C:\Users\<USER>\.local\pipx\venvs\codeqai\lib\site-packages\codeqai\vector_store.py", line 34,
.
This seems to be because "documents" is empty. Going back to app.py, the files var after files = repo.load_files()
has an array of docs, but documents does not after documents = codeparser.parse_code_files(files)
After some debugging, this seems to be because treesitterNodes
in codeparser.py by line 36 is empty. However, programming_language has content (Language.JAVASCRIPT /n Language.JAVASCRIPT
), TreesitterMethodNode
has <codeqai.treesitter.treesitter_js.TreesitterJavascript object at ....
(x2), and file_bytes
also has the expected file data.
I'm unfamiliar with Treesitter to be able to debug any further as to why treesitter_parser.parse(file_bytes)
is returning an empty array in this case.
Hope this can help.
P.S.
Didn't include this in the list as it may be my local ENV, but for some reason I was unable to run codeqai via pipx in python 3.10.5. It repeatedly wanted to use pyenv-win 3.9.6, even though that was nowhere on my system. I had to install 3.9.6 to be able to continue. This may be a local env issue from an old installation however.