aider icon indicating copy to clipboard operation
aider copied to clipboard

Uncaught OSError in __init__.py line 376

Open DeathGanker opened this issue 1 year ago • 1 comments

Aider version: 0.54.12 Python version: 3.11.9 Platform: macOS-14.1.2-arm64-arm-64bit Python implementation: CPython Virtual environment: No OS: Darwin 23.1.0 (64bit) Git version: git version 2.39.3 (Apple Git-145)

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 682, in main
    if args.message:
            ^^^^^^^^^
  File "base_coder.py", line 730, in run
    def get_input(self):
                    ^^^^^
  File "base_coder.py", line 773, in run_one
    return
  File "base_coder.py", line 1083, in send_message
    if self.verbose:
  File "base_coder.py", line 1021, in format_messages
    if self.main_model.reminder == "sys":
         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 971, in format_chat_chunks
    chunks.system = [
              ^^^^^^^^
  File "base_coder.py", line 627, in get_repo_messages
    ),
       
  File "base_coder.py", line 599, in get_repo_map
  File "repomap.py", line 124, in get_repo_map
    max_map_tokens = target
                    ^^^^^^^
  File "repomap.py", line 466, in get_ranked_tags_map
    use_cache = False
     ^^^^^^^^^^^^^^^^
  File "repomap.py", line 529, in get_ranked_tags_map_uncached
    upper_bound = num_tags
               ^^^^^^^^^^^^
  File "repomap.py", line 612, in to_tree
    output = ""
                
  File "repomap.py", line 568, in render_tree
    mtime = self.get_mtime(abs_fname)
                  ^^^^^^^^^^^^^^^^^^^
  File "grep_ast.py", line 47, in __init__
    parser = get_parser(lang)
             ^^^^^^^^^^^^^^^^
  File "core.pyx", line 19, in tree_sitter_languages.core.get_parser
  File "core.pyx", line 14, in tree_sitter_languages.core.get_language
  File "__init__.py", line 132, in __init__
    self.lib = cdll.LoadLibrary(fspath(path_or_ptr))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "__init__.py", line 454, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: dlopen(/Users/xiehu/miniconda3/envs/IntelligentTriag/lib/python3.11/site-packages/tree_sitter_languages/languages.so, 0x0006): tried: '/Users/xiehu/miniconda3/envs/IntelligentTriag/lib/python3.11/site-packages/tree_sitter_languages/languages.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/xiehu/miniconda3/envs/IntelligentTriag/lib/python3.11/site-packages/tree_sitter_languages/languages.so' (no such file), '/Users/xiehu/miniconda3/envs/IntelligentTriag/lib/python3.11/site-packages/tree_sitter_languages/languages.so' (no such file)

DeathGanker avatar Sep 27 '24 08:09 DeathGanker

Thank you for filing this issue.

Can you please try to install or reinstall aider in a separate Python environment? Either with venv or pipx?

Please remove the existing environment/aider installation first, e.g. with pipx:

$ pipx uninstall aider-chat
uninstalled aider-chat! ✨ 🌟 ✨
$ pipx install aider-chat
  installed package aider-chat 0.57.1, installed using Python 3.12.6
  These apps are now globally available
    - aider
done! ✨ 🌟 ✨

This document may be helpful -> https://aider.chat/docs/troubleshooting/imports.html

fry69 avatar Sep 27 '24 08:09 fry69

I'm closing this issue for now.

If any new related concerns arise, please feel free to comment, and I'll reopen the issue.

fry69 avatar Oct 05 '24 12:10 fry69