Aider-AI / aider

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

Uncaught FileNotFoundError in pathlib.py line 907 #2348

Closed Rmichail911 closed 1 day ago

Rmichail911 commented 1 day ago

Aider version: 0.62.1 Python version: 3.11.9 Platform: Linux-6.2.16-x86_64-with-glibc2.39 Python implementation: CPython Virtual environment: No OS: Linux 6.2.16 (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 586, in main
    git_root = setup_git(git_root, io)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "main.py", line 95, in setup_git
    elif Path.cwd() == Path.home():
         ^^^^^^^^^^
  File "pathlib.py", line 907, in cwd
    return cls(os.getcwd())
               ^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
paul-gauthier commented 1 day ago

Thanks for trying aider and filing this issue.

The fix 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. I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.