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 #2819

Closed
aleloi opened this issue Jan 10, 2025 · 3 comments
Closed

Uncaught AssertionError in fun.py line 210 #2819

aleloi opened this issue Jan 10, 2025 · 3 comments
Labels
question Further information is requested

Comments

@aleloi
Copy link

aleloi commented Jan 10, 2025

Aider version: 0.70.0
Python version: 3.11.6
Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.39
Python implementation: CPython
Virtual environment: No
OS: Linux 6.8.0-51-generic (64bit)
Git version: git version 2.43.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 1007, in main
    coder.run()
  File "base_coder.py", line 805, in run
    user_message = self.get_input()
                   ^^^^^^^^^^^^^^^^
  File "base_coder.py", line 825, in get_input
    self.get_addable_relative_files(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1849, in get_addable_relative_files
    all_files = set(self.get_all_relative_files())
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1834, in get_all_relative_files
    files = self.repo.get_tracked_files()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 301, 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

@aleloi
Copy link
Author

aleloi commented Jan 10, 2025

It's due to $(git update-index --show-index-version)==3 and #211

But i created the repo with aider and only modified it though aider. So why does it hit an assert?

@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and filing this issue.

It seems like your git is writing a version 3 repo. Not sure why.

@github-actions github-actions bot added the question Further information is requested label Jan 10, 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
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants