Find answers from the community

Updated 2 months ago

Tree sitter

Traceback (most recent call last):
File "/Users/bhavyagiri/Developer/studypod/agent/core/main.py", line 13, in <module>
indexing_local_repo(path,language)
File "/Users/bhavyagiri/Developer/studypod/agent/core/main.py", line 7, in indexing_local_repo
indexing.indexing_local_repo(path,language)
File "/Users/bhavyagiri/Developer/studypod/agent/core/engine/indexing.py", line 10, in indexing_local_repo
nodes = get_nodes(documents,language)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bhavyagiri/Developer/studypod/agent/core/engine/utils.py", line 28, in get_nodes
splitter = CodeSplitter(
^^^^^^^^^^^^^
File "/Users/bhavyagiri/Developer/studypod/agent/.venv/lib/python3.11/site-packages/llama_index/core/node_parser/text/code.py", line 63, in init
parser = tree_sitter_languages.get_parser(language)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "tree_sitter_languages/core.pyx", line 19, in tree_sitter_languages.core.get_parser
File "tree_sitter_languages/core.pyx", line 14, in tree_sitter_languages.core.get_language
TypeError: init() takes exactly 1 argument (2 given)
L
B
6 comments
Tree sitter is kind of borked in latest versions, try downgrading a bit
I forget the version that introduced this bug
downgrading to tree-sitter==0.21.3
Attachment
image.png
seems like it couldn't parse the code you provided with python?
Add a reply
Sign up and join the conversation on Discord