Skip to content

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

Description

@tardis4500

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'

Activity

  1. Byron commented on Jan 12, 2019

    @Byron
    Member

    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

  2. tardis4500 commented on Mar 11, 2019

    @tardis4500
    Author

    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)

  3. Byron commented on Jul 20, 2019

    @Byron
    Member

    Thanks a lot! I could reproduce the issue.

  4. metakernelteam commented on Oct 5, 2022

    @metakernelteam

    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:
        
    
  5. Asmokin11 commented on May 26, 2023

    @Asmokin11

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

  6. Byron commented on May 27, 2023

    @Byron
    Member

    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.

  7. added a commit that references this issue on Apr 28, 2025
    d85574e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions