Skip to content

AttributeError: 'PushInfo' object has no attribute 'name' #820

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

Closed
tardis4500 opened this issue Jan 2, 2019 · 6 comments
Closed

AttributeError: 'PushInfo' object has no attribute 'name' #820

tardis4500 opened this issue Jan 2, 2019 · 6 comments

Comments

@tardis4500
Copy link

A simple call to:
result = self._client.remotes.origin.push(**args)
print(result.summary)
results in:
Traceback (most recent call last):
File "C:\Users\jsmith\Envs\halpy\lib\site-packages\halpy\cms.py", line 623, in checkin_files
print(result.summary)
File "C:\Users\jsmith\Envs\halpy\lib\site-packages\git\util.py", line 883, in getattr
if getattr(item, self._id_attr) == attr:
AttributeError: 'PushInfo' object has no attribute 'name'

@Byron
Copy link
Member

Byron commented Jan 12, 2019

Which version of GitPython are you using? Could you also provide a more self-contained example on how to reproduce the issue? Maybe **args makes all the difference.
Thank you

@tardis4500
Copy link
Author

tardis4500 commented Mar 11, 2019

I'm using 2.1.11 and the following will reproduce the error.

import git
git_client = git.Repo.clone_from(some_repo, 'test_clone')
result = git_client.remotes.origin.push()
print(result.summary)

@Byron
Copy link
Member

Byron commented Jul 20, 2019

Thanks a lot! I could reproduce the issue.

@metakernelteam
Copy link

I have a similar problem, when printing result.summary:

AttributeError: 'PushInfo' object has no attribute 'push_infos'

This is the full stack:

    print(pushinfo.summary)
  File "/data/users/leit/fbsource/fbcode/buck-out/dev/gen/kernel/ksyncer/ksyncer#link-tree/git/util.py", line 998, in __getattr__
    if getattr(item, self._id_attr) == attr:
    

@Asmokin11
Copy link

I am also facing the same error as @metakernelteam when trying to print the summary

@Byron
Copy link
Member

Byron commented May 27, 2023

I think it would be good to open a new issue for this, as that would contain instruction to reproduce a possibly new issue that looks similar. All that is under the assumption that this issue was actually fixed a couple of years ago - otherwise please do feel free to add instructions here for a reproduction to have this issue reopened instead. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants