Skip to content

Exception from tree-sitter on every run #14

Closed
@npt

Description

@npt

I get this exception whenever running grep-ast:

Traceback (most recent call last):
  File "/home/nick/.local/bin/gast", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/nick/.local/pipx/venvs/grep-ast/lib/python3.11/site-packages/grep_ast/main.py", line 60, in main
    process_filename(fname, args)
  File "/home/nick/.local/pipx/venvs/grep-ast/lib/python3.11/site-packages/grep_ast/main.py", line 88, in process_filename
    tc = TreeContext(
         ^^^^^^^^^^^^
  File "/home/nick/.local/pipx/venvs/grep-ast/lib/python3.11/site-packages/grep_ast/grep_ast.py", line 47, in __init__
    parser = get_parser(lang)
             ^^^^^^^^^^^^^^^^
  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)

This occurs when using both Python 3.12 and 3.11 (I tried 3.11 based on some of the comments on #7, but I don't know if/how this is related to that issue).
Environment: Ubuntu 24.04, installing using pipx, using the system Python (or Python 3.11 from the deadsnakes PPA).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions