Skip to content

Fail to use this library with pythonΒ #79

@jefcolbi

Description

@jefcolbi

Hi.

The following snippet of code

import tree_sitter_dart as tsdart
from tree_sitter import Language, Parser

DART_LANGUAGE = Language(tsdart.language())

parser = Parser(DART_LANGUAGE)

file_path = "/home/jefcolbi/Projets/lll_mobile/lib/core/models/credentials.dart"

with open(file_path, 'rb') as fp:
    tree = parser.parse(fp.read())

print(tree)

Throws this error

/home/jefcolbi/Projets/Tests/tree-sitter-dart/.venv/bin/python /home/jefcolbi/Projets/Tests/tree-sitter-dart/persotests.py
Traceback (most recent call last):
  File "/home/jefcolbi/Projets/Tests/tree-sitter-dart/persotests.py", line 1, in <module>
    import tree_sitter_dart as tsdart
  File "/home/jefcolbi/Projets/Tests/tree-sitter-dart/bindings/python/tree_sitter_dart/__init__.py", line 3, in <module>
    from ._binding import language
ImportError: /home/jefcolbi/Projets/Tests/tree-sitter-dart/bindings/python/tree_sitter_dart/_binding.abi3.so: undefined symbol: tree_sitter_dart_external_scanner_create

Process finished with exit code 1

OS: Ubuntu 20.04 64bits
Python: 3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions