Aider-AI / aider

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

Uncaught ValueError in <frozen ntpath> line 791 #2125

Open RussellOKS opened 3 days ago

RussellOKS commented 3 days ago

Aider version: 0.60.0 Python version: 3.12.0 Platform: Windows-11-10.0.22631-SP0 Python implementation: CPython Virtual environment: Yes OS: Windows 11 (64bit) Git version: git version 2.45.2.windows.1

An uncaught exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "__main__.py", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 776, in main
    coder.run()
  File "base_coder.py", line 729, in run
    user_message = self.get_input()
                   ^^^^^^^^^^^^^^^^
  File "base_coder.py", line 742, in get_input
    return self.io.get_input(
           ^^^^^^^^^^^^^^^^^^
  File "io.py", line 362, in get_input
    os.path.relpath(fname, root) for fname in (abs_read_only_fnames or [])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen ntpath>", line 791, in relpath
ValueError: path is on mount 'C:', start on mount 'W:'
paul-gauthier commented 2 days ago

Thanks for trying aider and filing this issue.

This looks like a duplicate of #1433. 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.

RussellOKS commented 1 day ago

Thanks Paul for an incredibly useful tool - I absolutely love it and use it every day.

This issue has not been resolved as of v0.60.1 and it is easy to repeat with following steps. I am doing this on Windows 11 and all that detail was sent before.

Activate the venv which is on the C drive and run Aider and it works fine. Activate the venv which is on the C drive and then change to drive W: and run Aider and it produces the error if version is above v.59

paul-gauthier commented 1 day ago

I just pushed a fix for this. The change is available in the main branch. You can get it by installing the latest version from github:

aider --install-main-branch

# or...

python -m pip install --upgrade --upgrade-strategy only-if-needed git+https://github.com/Aider-AI/aider.git

If you have a chance to try it, let me know if it works better for you.