Skip to content

tree-sitter version must be bound in requirements.txt #14

@mahtab-nejati

Description

@mahtab-nejati

I was trying this parser in a new environment where I installed tree-sitter==0.22.3 on MacOS, but I kept getting the following error:

Traceback (most recent call last):
  File "/.../tree-sitter-parser/tree-sitter-parser.py", line 55, in <module>
    main()
  File "/.../tree-sitter-parser/tree-sitter-parser.py", line 41, in main
    parsers = init_parsers(script_dir)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.../tree-sitter-parser/tree_sitter_parser/__init__.py", line 22, in init_parsers
    if Language.build_library(
       ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'tree_sitter.Language' has no attribute 'build_library'

My attempt in another environment with tree_sitter==0.20.1 was successful. It might be a good idea to bind the tree-sitter requirement to a specific version. You can see this discussion for more information.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions