paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
19.37k stars 1.79k forks source link

Uncaught TypeError in core.pyx line 14 #1799

Open optimizeforall opened 15 hours ago

optimizeforall commented 15 hours ago

Aider version: 0.56.0 Python version: 3.12.5 Platform: Linux-5.13.19-2-MANJARO-x86_64-with-glibc2.40 Python implementation: CPython Virtual environment: No OS: Linux 5.13.19-2-MANJARO (64bit) Git version: git version 2.46.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 698, in main
    coder.run()
  File "base_coder.py", line 735, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 778, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1213, in send_message
    lint_errors = self.lint_edited(edited)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1307, in lint_edited
    errors = self.linter.lint(self.abs_root_path(fname))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 100, in lint
    lintres = cmd(fname, rel_fname, code)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 117, in py_lint
    basic_res = basic_lint(rel_fname, code)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 213, in basic_lint
    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
TypeError: __init__() takes exactly 1 argument (2 given)
fry69 commented 15 hours ago

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