Skip to content

Uncaught RuntimeError in pathlib.py line 1239 #5146

@steverozen

Description

@steverozen

Aider version: 0.86.2
Python version: 3.12.3
Platform: Linux-6.17.0-29-generic-x86_64-with-glibc2.39
Python implementation: CPython
Virtual environment: Yes
OS: Linux 6.17.0-29-generic (64bit)
Git version: git version 2.54.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "pathlib.py", line 1252, in resolve
    p.stat()
  File "pathlib.py", line 842, in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 40] Too many levels of symbolic links: '/home/steve/MEGA/ea/EA'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aider", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 1162, in main
    coder.run()
  File "base_coder.py", line 887, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 934, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1429, in send_message
    chunks = self.format_messages()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1334, in format_messages
    chunks = self.format_chat_chunks()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1281, in format_chat_chunks
    chunks.repo = self.get_repo_messages()
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 752, in get_repo_messages
    repo_content = self.get_repo_map()
                   ^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 719, in get_repo_map
    all_abs_files = set(self.get_all_abs_files())
                        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 2166, in get_all_abs_files
    files = [self.abs_root_path(path) for path in files]
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 572, in abs_root_path
    res = utils.safe_abs_path(res)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "utils.py", line 98, in safe_abs_path
    res = Path(res).resolve()
          ^^^^^^^^^^^^^^^^^^^
  File "pathlib.py", line 1254, in resolve
    check_eloop(e)
  File "pathlib.py", line 1239, in check_eloop
    raise RuntimeError("Symlink loop from %r" % e.filename)
RuntimeError: Symlink loop from '/home/steve/MEGA/ea/EA'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions