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' #1310

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

AttributeError: 'FancyRepo' object has no attribute 'object_store' #1310

rbeerster opened this issue May 13, 2024 · 7 comments

Comments

@rbeerster
Copy link

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

Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 363, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 326, in execute
    for data in application_iter:
  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.

@jelmer
Copy link
Owner

jelmer commented May 13, 2024

FancyStore is a class defined by Klaus rather than Dulwich, so I think this is a Klaus bug. Or at the very least it would be good to have this reproduced outside of klaus.

@rbeerster
Copy link
Author

Thanks, I will open an issue there.

@jonashaag
Copy link
Contributor

@jelmer has anything changed about the repo class structure recently?

@jonashaag
Copy link
Contributor

xref jonashaag/klaus#326

@jelmer
Copy link
Owner

jelmer commented May 13, 2024

@jonashaag no, none of this stuff has changed for a long time. With my basic understanding of FancyRepo I also can't understand what's happening here - aren't all properties provided though?

@jonashaag
Copy link
Contributor

Oh, the problem doesn't seem to be that the class properties have changed but that I missed to proxy the .object_store property and now it's required

@jelmer
Copy link
Owner

jelmer commented May 20, 2024

Fixed on the klaus side - closing this

@jelmer jelmer closed this as completed May 20, 2024
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

3 participants