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

AttributeError: 'MemoryObjectStore' object has no attribute 'add_pack_data' #1157

Closed
dAnjou opened this issue Mar 11, 2023 · 0 comments · Fixed by #1160
Closed

AttributeError: 'MemoryObjectStore' object has no attribute 'add_pack_data' #1157

dAnjou opened this issue Mar 11, 2023 · 0 comments · Fixed by #1160

Comments

@dAnjou
Copy link

dAnjou commented Mar 11, 2023

Hi,

I just updated from 0.20.50 to 0.21.3 and I'm getting this error now:

Traceback (most recent call last):
  #
  # START my code
  #
  File "/Users/xyz/Projects/fs-code/src/codefs/_core.py", line 108, in _delegate
    self.mount(mount_point, self.fetch_archive(ref))
  File "/Users/xyz/Projects/fs-code/src/codefs/gitfs/__init__.py", line 72, in __call__
    result: FetchPackResult = self._client.fetch(self._path, self._repo)  # type: ignore
  #
  # END my code / START dulwich
  #
  File "/Users/xyz/Projects/fs-code/.venv/lib/python3.10/site-packages/dulwich/client.py", line 1456, in fetch
    refs = r.fetch(
  File "/Users/xyz/Projects/fs-code/.venv/lib/python3.10/site-packages/dulwich/repo.py", line 405, in fetch
    target.object_store.add_pack_data(count, pack_data, progress)
  #
  # END dulwich
  #
AttributeError: 'MemoryObjectStore' object has no attribute 'add_pack_data'

This is how I'm initializing the repo:

# tmp_path is a Path fixture from pytest
porcelain.init(repo := str(tmp_path))
(test_file := tmp_path / "file").write_text("something")
porcelain.add(repo, str(test_file))
porcelain.commit(repo, message="test")

Is this a bug?

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

Successfully merging a pull request may close this issue.

1 participant