Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ValueError in pathlib.py line 682 #2483

Closed
golergka opened this issue Nov 28, 2024 · 1 comment
Closed

Uncaught ValueError in pathlib.py line 682 #2483

golergka opened this issue Nov 28, 2024 · 1 comment

Comments

@golergka
Copy link

  1. Opened Aider in architect mode
  2. Added a single file
  3. Pasted a screenshot with some text on it
  4. Generated a response with architect model
  5. Pressed [Y] on modify files prompt

Aider version: 0.65.1
Python version: 3.12.6
Platform: macOS-15.1-arm64-arm-64bit
Python implementation: CPython
Virtual environment: Yes
OS: Darwin 24.1.0 (64bit)
Git version: git version 2.39.5 (Apple Git-154)

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 887, in main
    coder.run()
  File "base_coder.py", line 758, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 801, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1278, in send_message
    self.reply_completed()
  File "architect_coder.py", line 36, in reply_completed
    editor_coder = Coder.create(**new_kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 165, in create
    res = coder(main_model, io, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 378, in __init__
    if self.repo and self.repo.ignored_file(fname):
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 349, in ignored_file
    result = self.ignored_file_raw(fname)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 355, in ignored_file_raw
    fname_path = Path(self.normalize_path(fname))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 307, in normalize_path
    path = str(Path(PurePosixPath((Path(self.root) / path).relative_to(self.root))))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pathlib.py", line 682, in relative_to
    raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")
ValueError: '/private/var/folders/c9/_z1jn11968557brl0bl5hx900000gn/T/tmpfcsy8iwx/clipboard_image.png' is not in the subpath of '/Users/golergka/Projects/my/project/path'

@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and filing this issue.

This looks like a duplicate of #1774. Please see the comments there for more information, and feel free to continue the discussion within that issue.

I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue.Note: A bot script made these updates to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants