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 fun.py line 673 #1509

Closed
geraldthewes opened this issue Sep 12, 2024 · 3 comments
Closed

Uncaught ValueError in fun.py line 673 #1509

geraldthewes opened this issue Sep 12, 2024 · 3 comments

Comments

@geraldthewes
Copy link

Aider version: 0.56.0
Python version: 3.12.4
Platform: Linux-6.8.0-40-generic-x86_64-with-glibc2.35
Python implementation: CPython
Virtual environment: No
OS: Linux 6.8.0-40-generic (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 558, in main
    if not sanity_check_repo(repo, io):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "main.py", line 304, in sanity_check_repo
    repo.get_tracked_files()
  File "repo.py", line 273, in get_tracked_files
    for blob in commit.tree.traverse():
  File "util.py", line 575, in _traverse
    addToStack(stack, item, branch_first, nd)
  File "util.py", line 535, in addToStack
    lst = self._get_intermediate_items(item)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "tree.py", line 207, in _get_intermediate_items
    return tuple(index_object._iter_convert_to_object(index_object._cache))
                                                      ^^^^^^^^^^^^^^^^^^^
  File "util.py", line 253, in __getattr__
    self._set_cache_(attr)
  File "tree.py", line 214, in _set_cache_
    self._cache: List[TreeCacheTup] = tree_entries_from_data(ostream.read())
                                                             ^^^^^^^^^^^^^^
  File "base.py", line 138, in read
    return self[3].read(size)
           ^^^^^^^^^^^^^^^^^^
  File "stream.py", line 487, in read
    bl = self._size - self._br      # bytes left
         ^^^^^^^^^^
  File "util.py", line 253, in __getattr__
    self._set_cache_(attr)
  File "stream.py", line 461, in _set_cache_brute_
    apply_delta_data(bbuf, src_size, ddata, len(ddata), tbuf.write)
  File "fun.py", line 673, in apply_delta_data
    raise ValueError("unexpected delta opcode 0")
ValueError: unexpected delta opcode 0

I get this error when launching aider in a git report that has multiple React project

aider --model ollama/deepseek-coder-v2

If I launch it with --no-git, no error

$ aider --no-git --model ollama/deepseek-coder-v2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Warning for ollama/deepseek-coder-v2: Unknown context window size and costs, using sane defaults.
Did you mean one of these?

Proceed anyway? (Y)es/(N)o [Yes]: y
Aider v0.56.0
Model: ollama/deepseek-coder-v2 with whole edit format
Git repo: none
Repo-map: disabled
Use /help for help, run "aider --help" to see cmd line args
Note: in-chat filenames are always relative to the git working dir, not the current working dir.

But repo-map is disabled and I want to enable it. Now that issue might be independent.

@geraldthewes
Copy link
Author

Sounds like the same issue as ticket #296 from last year

@geraldthewes
Copy link
Author

Am I reading #292 correctly that basically aider (because of gitdb) only supports older versions of git and is basically not usable on any modern system? I'm surprised this is not a more important issue or am I missing something?

@paul-gauthier
Copy link
Owner

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 git+https://github.com/paul-gauthier/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.

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