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: 'FancyRepo' object has no attribute 'object_store' #326

Closed
rbeerster opened this issue May 13, 2024 · 5 comments
Closed

Comments

@rbeerster
Copy link

Here is an error from trying to clone a repository using klaus:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 183, in handle_request
    for item in respiter:
  File "/usr/local/lib64/python3.9/site-packages/dulwich/web.py", line 231, in get_info_refs
    handler.handle()
  File "/usr/local/lib64/python3.9/site-packages/dulwich/server.py", line 379, in handle
    self.repo.object_store,
AttributeError: 'FancyRepo' object has no attribute 'object_store'

Python version 3.9.18 and klaus installed using pip. Here is how klaus was instantiated:

/usr/local/bin/klaus --smarthttp /var/lib/git/repo.git/

It seems object_store, self.repo.get_peeled, and self.repo.refs.get_symrefs are all undefined. This is on Rocky Linux 9.3.

@jonashaag
Copy link
Owner

Can you please check what number of Dulwich that uses. Maybe Python 3.9 is too old

@rbeerster
Copy link
Author

The version is dulwich-0.22.1, which appears to support Python 3.7 and newer.

@jonashaag
Copy link
Owner

@rbeerster I tried reproducing locally but your traceback does not match the line numbers in 0.22.1. Are you sure that's the version you are using?

@rbeerster
Copy link
Author

Here is what I see:

[root@git ~]# ls -l /usr/local/lib64/python3.9/site-packages/
total 4
drwxr-xr-x. 6 root root 4096 May 12 19:54 dulwich
drwxr-xr-x. 2 root root  143 May 12 15:33 dulwich-0.22.1.dist-info

@jonashaag
Copy link
Owner

Thank you for reporting this. I looks like cloning and pushing has been broken for a long time. I will make a new release soon.

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