8000 aider: Could not find language library for python · Issue #224978 · Homebrew/homebrew-core · GitHub
[go: up one dir, main page]

Skip to content
aider: Could not find language library for python #224978
@pencil

Description

@pencil

brew gist-logs <formula> link OR brew config AND brew doctor output

$ brew config
HOMEBREW_VERSION: 4.5.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: dc0f9d50fd170492a33fd7234d06de1b94df363c
Last commit: 4 days ago
Branch: stable
Core tap JSON: 28 May 16:50 UTC
Core cask tap JSON: 28 May 16:50 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BROWSER: open
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: nvim
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_ANALYTICS: set
Homebrew Ruby: 3.4.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.4/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 16.0.0 build 1600
Git: 2.49.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.5-arm64
CLT: 16.3.0.0.1.1742442376
Xcode: 16.1
Rosetta 2: false



$ brew doctor
Your system is ready to brew.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

After upgrading aider from 0.82.2 to 0.83.2 (#222577), aider no longer seem to work in Python (Django) projects. I suspect something is wrong with how it was packaged for homebrew.

What happened (include all command output)?

█░         Updating repo map: backend/__init__.py
# Uncaught LookupError in __init__.py line 218

Aider version: 0.83.2
Python version: 3.12.10
Platform: macOS-15.5-arm64-arm-64bit
Python implementation: CPython
Virtual environment: Yes
OS: Darwin 24.5.0 (64bit)
Git version: git version 2.49.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "__init__.py", line 202, in get_binding
    module = import_module(name=f".bindings.{language_name}", package=__package__)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1293, in create_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: dlopen(/opt/homebrew/Cellar/aider/0.83.2/libexec/lib/python3.12/site-packages/tree_sitter_language_pack/bindings/python.abi3.so, 0x0002): tried: '/opt/homebrew/Cellar/aider/0.83.2/libexec/lib/python3.12/site-packages/tree_sitter_language_pack/bindings/python.abi3.so' (slice is not valid mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/aider/0.83.2/libexec/lib/python3.12/site-packages/tree_sitter_language_pack/bindings/python.abi3.so' (no such file), '/opt/homebrew/Cellar/aider/0.83.2/libexec/lib/python3.12/site-packages/tree_sitter_language_pack/bindings/python.abi3.so' (slice is not valid mach-o file)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 1154, in main
    coder.run()
  File "base_coder.py", line 882, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 929, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1424, in send_message
    chunks = self.format_messages()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1329, in format_messages
    chunks = self.format_chat_chunks()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1276, in format_chat_chunks
    chunks.repo = self.get_repo_messages()
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 747, in get_repo_messages
    repo_content = self.get_repo_map()
                   ^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 719, in get_repo_map
    repo_content = self.repo_map.get_repo_map(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 134, in get_repo_map
    files_listing = self.get_ranked_tags_map(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 597, in get_ranked_tags_map
    result = self.get_ranked_tags_map_uncached(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 666, in get_ranked_tags_map_uncached
    tree = self.to_tree(ranked_tags[:middle], chat_rel_fnames)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 749, in to_tree
    output += self.render_tree(cur_abs_fname, cur_fname, lois)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 705, in render_tree
    context = TreeContext(
              ^^^^^^^^^^^^
  File "grep_ast.py", line 46, in __init__
    parser = get_parser(lang)
             ^^^^^^^^^^^^^^^^
  File "__init__.py", line 243, in get_parser
    return Parser(get_language(language_name=language_name))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "__init__.py", line 230, in get_language
    binding = get_binding(language_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "__init__.py", line 218, in get_binding
    raise LookupError(f"Could not find language library for {language_name}") from e
LookupError: Could not find language library for python

What did you expect to happen?

aider should run normally as if installed via pip

Step-by-step reproduction instructions (by running brew commands)

brew install aider

# In a Python project:
aider

# Once aider loads:
/map-refresh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0