-
Notifications
You must be signed in to change notification settings - Fork 53
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
error when calling get_language('any_language') #64
Comments
Quick-fix is to downgrade to $ pip install -U tree-sitter==0.21.3 In my particular case that results in an unwelcome warning being emitted to the console at runtime:
but that is easily avoided in my case using the |
FWIW an example traceback:
|
@samuela I don't think they are going to update this repo. The main tree-sitter project had a rewrite. For python do this(from py-tree-sitter repo):
import tree_sitter_python as tspython
from tree_sitter import Language, Parser
PY_LANGUAGE = Language(tspython.language()) For any other languages, you have to wait until someone makes the PyPI package for it |
- Fix `examples/code_search.ipynb` which was failing on `get_language()`. - Caused by [issue](grantjenks/py-tree-sitter-languages#64) in `tree-sitter` and `tree-sitter-languages`. - The `transform_document` endpoint now returns the error message and traceback when a transformer task fails. - Was previously throwing a 500.
I faced the same issue. I downgraded my version but not sure which one. Here are my versions of both tree-sitter & tree-sitter-languages |
I'm facing this issue. I downgraded to 0.21.3 as suggested in the first response tree-sitter: 0.21.3 seems to be working so far |
…ree_sitter_language_pack tree-sitter-languages appears [dormant](grantjenks/py-tree-sitter-languages#64), while [tree-sitter-language-pack](https://pypi.org/project/tree-sitter-language-pack/) supports tree-sitter 0.22 and many languages.
tree-sitter-languages appears dormant while tree-sitter-language-pack supports tree-sitter 0.22 and many languages. See: grantjenks/py-tree-sitter-languages#64 https://pypi.org/project/tree-sitter-language-pack
tree-sitter-languages appears dormant while tree-sitter-language-pack supports tree-sitter 0.22 and many languages. See: grantjenks/py-tree-sitter-languages#64 https://pypi.org/project/tree-sitter-language-pack
tree-sitter-languages appears dormant while tree-sitter-language-pack supports tree-sitter 0.22 and many languages. It should be pretty much a drop-in replacement. See: grantjenks/py-tree-sitter-languages#64 https://pypi.org/project/tree-sitter-language-pack
Same here for: from tree_sitter_languages import get_language
TS_LANGUAGE = get_language('typescript') Works for:
but not for
where I get
|
I brought this issue to the attention of |
How to load customized languages (compiled to a .so file) now? |
https://github.com/Goldziher/tree-sitter-language-pack This is the latest actively maintained fork of this library. |
tree-sitter has updated the Language class and how they initialize it so now it takes just one parameter. here: example usage
The text was updated successfully, but these errors were encountered: