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 AssertionError in fun.py line 210 #2965

Closed
greglearns opened this issue Jan 22, 2025 · 1 comment
Closed

Uncaught AssertionError in fun.py line 210 #2965

greglearns opened this issue Jan 22, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@greglearns
Copy link

Aider version: 0.72.1
Python version: 3.12.8
Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.40
Python implementation: CPython
Virtual environment: Yes
OS: Linux 6.8.0-51-generic (64bit)
Git version: git version 2.47.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 1037, in main
    coder.run()
  File "base_coder.py", line 822, in run
    user_message = self.get_input()
                   ^^^^^^^^^^^^^^^^
  File "base_coder.py", line 842, in get_input
    self.get_addable_relative_files(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1867, in get_addable_relative_files
    all_files = set(self.get_all_relative_files())
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1852, in get_all_relative_files
    files = self.repo.get_tracked_files()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 312, in get_tracked_files
    staged_files = [path for path, _ in index.entries.keys()]
                                        ^^^^^^^^^^^^^
  File "util.py", line 253, in __getattr__
    self._set_cache_(attr)
  File "base.py", line 168, in _set_cache_
    self._deserialize(stream)
  File "base.py", line 197, in _deserialize
    self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream)
                                                                    ^^^^^^^^^^^^^^^^^^
  File "fun.py", line 252, in read_cache
    version, num_entries = read_header(stream)
                           ^^^^^^^^^^^^^^^^^^^
  File "fun.py", line 210, in read_header
    assert version in (1, 2)
           ^^^^^^^^^^^^^^^^^
AssertionError

Context: in the prompt that triggered this error, I mentioned a file XXX.txt that was actually located at subdirectory/XXX.txt and was included in the editable list as subdirectory/XXX.txt. Hope that helps.

@paul-gauthier paul-gauthier added the bug Something isn't working label Jan 22, 2025
Copy link

Thanks for trying aider and filing this issue.

This looks like a duplicate of #1241. 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
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants