← 返回首页
AttributeError: 'NoneType' object has no attribute 'TerminateProcess' when accessing tree during iter_commits · Issue #2102 · gitpython-developers/GitPython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

AttributeError: 'NoneType' object has no attribute 'TerminateProcess' when accessing tree during iter_commits #2102

New issue
New issue

Description

GitPython version: 3.1.46

Given the following code:

def process_commits() -> None: repo = Repo(search_parent_directories=True) for commit in repo.iter_commits(max_count=10): print(commit.hexsha) commit.tree / "file.yml" if __name__ == "__main__": process_commits()

Upon exiting the python script, the following error occurs:

Exception ignored in: <function _AutoInterrupt.__del__ at 0x000002B181033CE0> Traceback (most recent call last): File ".venv\Lib\site-packages\git\cmd.py", line 376, in __del__ File ".venv\Lib\site-packages\git\cmd.py", line 367, in _terminate File "C:\Program Files\Python312\Lib\subprocess.py", line 1673, in terminate AttributeError: 'NoneType' object has no attribute 'TerminateProcess'

The error does not occur if the commit.tree call is commented out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.