Aider-AI / aider

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

Uncaught RecursionError in linter.py line 264 #2148

Open fidelsalz opened 4 hours ago

fidelsalz commented 4 hours ago

Aider version: 0.60.0 Python version: 3.12.7 Platform: Linux-6.10.10-arch1-1-x86_64-with-glibc2.40 Python implementation: CPython Virtual environment: No OS: Linux 6.10.10-arch1-1 (64bit) Git version: git version 2.47.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 776, in main
    coder.run()
  File "base_coder.py", line 730, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 773, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1223, in send_message
    lint_errors = self.lint_edited(edited)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1320, in lint_edited
    errors = self.linter.lint(self.abs_root_path(fname))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 108, in lint
    lintres = basic_lint(rel_fname, code)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 224, in basic_lint
    errors = traverse_tree(tree.root_node)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 264, in traverse_tree
    errors += traverse_tree(child)
              ^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 264, in traverse_tree
    errors += traverse_tree(child)
              ^^^^^^^^^^^^^^^^^^^^
  File "linter.py", line 264, in traverse_tree
    errors += traverse_tree(child)
              ^^^^^^^^^^^^^^^^^^^^
  [Previous line repeated 989 more times]
RecursionError: maximum recursion depth exceeded
fidelsalz commented 4 hours ago

Aider was writing an sql code that had to repeat 400 times the same commands just changing single words on it. Apparently it reached the final but gave error before saving the file.