py-tree-sitter: .so files built now throws error `ValueError: Incompatible Language version 12. Must not be between 9 and 11`

I just built a .so file for Python language (using py-tree-sitter) and now then I am trying to use it, it throws an error -

ValueError: Incompatible Language version 12. Must not be between 9 and 11

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Hello!

Installing the (current) latest packages as:

python -m pip install tree-sitter==0.24.0 tree-sitter-c==0.23.5

and running the following snippet:

import tree_sitter_c as tsc
from tree_sitter import Language, Parser

C_LANGUAGE = Language(tsc.language())
parser = Parser(C_LANGUAGE)

results in the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Incompatible Language version 15. Must be between 13 and 14

I am using tree-sitter-python and tree-sitter-c with 0.2.0, 0.2.1, 0.2.2. Having the same issue ValueError: Incompatible Language version 13. Must not be between 9 and 12

Same issue for the 0.2.1 installed via pip install tree_sitter, and found several issues related with this (#72, #60)

Thank you for the feedback! I’ve tried the new version, i.e., 0.2.2 but I still get the same error. How can I update the core/submodule?

I had the same issue. It was resolved by using tree_sitter version: 0.19.0.

Acutally, 0.19.0 is the latest version in pip right now.

pip install tree_sitter==0.19.0

tree-sitter core submodule version bump

Thank you for the feedback! I’ve tried the new version, i.e., 0.2.2 but I still get the same error. How can I update the core/submodule?

This is an incompatibility between the latest version of tree-sitter-python and the older version of tree-sitter that this library was using. I have published a new version, 0.2.0, that should fix this.

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.68. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.