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 error trying to watch directory user doesn't have permissions for #3317

Open
harleypig opened this issue Feb 20, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@harleypig
Copy link

Issue

I have a secrets directory that is owned by root. I also have an .env file owned by root.

$ l -d  deployarr/{.env,secrets}
-rw-------+ 1 root root  643 Feb 19 00:41 deployarr/.env
drw-------+ 2 root root 4096 Feb 19 00:45 deployarr/secrets/

aider doesn't have a problem with .env in any combination I can think of, but the secrets directory is causing the error below, regardless of if it's in .gitignore or .aiderignore or not.

The prompt is invisible, but I can still enter commands, watched files are still managed, but this pops up after every call.

 $ aider
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Found OPENAI_API_KEY so using gpt-4o since no --model was specified.
Aider v0.74.2
Main model: gpt-4o with diff edit format
Weak model: gpt-4o-mini
Git repo: .git with 182 files
Repo-map: using 2048 tokens, auto refresh
Added CONVENTIONS.md to the chat (read-only).
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Readonly: CONVENTIONS.md
> Exception in thread Thread-2 (watch_files):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/home/harleypig/.local/share/pipx/venvs/aider-chat/lib/python3.12/site-packages/aider/watch.py", line 151, in watch_files
    raise e
  File "/home/harleypig/.local/share/pipx/venvs/aider-chat/lib/python3.12/site-packages/aider/watch.py", line 142, in watch_files
    for changes in watch(
  File "/home/harleypig/.local/share/pipx/venvs/aider-chat/lib/python3.12/site-packages/watchfiles/main.py", line 126, in watch
    with RustNotify(
         ^^^^^^^^^^^
PermissionError: Permission denied (os error 13) about ["/home/harleypig/projects/harleydev/deployarr/secrets"]

Version and model info

Aider v0.74.2
Main model: gpt-4o with diff edit format
Weak model: gpt-4o-mini
Git repo: .git with 182 files
Repo-map: using 2048 tokens, auto refresh

@paul-gauthier paul-gauthier added the bug Something isn't working label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants