Skip to content

Fail to use this library with python #79

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

Open
jefcolbi opened this issue Jan 21, 2025 · 1 comment
Open

Fail to use this library with python #79

jefcolbi opened this issue Jan 21, 2025 · 1 comment

Comments

@jefcolbi
Copy link

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

@g-drozdov
Copy link

@jefcolbi Hi!
I have the same issue. Did you manage to solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants