GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — AttributeError: 'NoneType' object has no attribute 'TerminateProcess' when accessing tree during iter_commits · Issue #2102 · gitpython-developers/GitPython

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

New issue
Copy link
New issue
Copy link
Closed
#2105
Closed
AttributeError: 'NoneType' object has no attribute 'TerminateProcess' when accessing tree during iter_commits#2102
#2105
Copy link
Labels
acknowledgedhelp wanted

Description

@MichaelJJ
MichaelJJ
opened on Feb 19, 2026
Issue body actions

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.

Activity

  1. Byron
    added
    help wanted
    acknowledged
    on Feb 20, 2026
  2. Byron commented on Feb 20, 2026

    @Byron
    Byron
    on Feb 20, 2026
    Member
    More actions

    Thanks for reporting.

    I know that during shutdown, some parts of the Python standard library become unavailable, which is probably the reason that something that is usually there isn't anymore.

  3. EliahKagan
    closed this as completedin #2105on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgedhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.