Skip to content

Crash whilst generating report #258

Open
@skye-pp

Description

Describe the bug

Hi there, and happy new year 🎉

I'm trying out this action on relatively large organization (~1k repositories) and finding that it crashes out after a minute or so, in approximately the same place each time.

The traceback isn't obviously about rate limiting so I thought I'd raise an issue:

Traceback (most recent call last):
  File "/action/workspace/stale_repos.py", line 424, in <module>
    main()
    ~~~~^^
  File "/action/workspace/stale_repos.py", line 55, in main
    inactive_repos = get_inactive_repos(
        github_connection, inactive_days_threshold, organization, additional_metrics
    )
  File "/action/workspace/stale_repos.py", line 146, in get_inactive_repos
    repo_data = set_repo_data(
        repo, days_inactive, active_date_disp, visibility, additional_metrics
    )
  File "/action/workspace/stale_repos.py", line 404, in set_repo_data
    repo_data["days_since_last_release"] = get_days_since_last_release(repo)
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/action/workspace/stale_repos.py", line 167, in get_days_since_last_release
    last_release = next(repo.releases())
  File "/usr/local/lib/python3.13/site-packages/github3/structs.py", line 142, in __next__
    return next(self.__i__)
  File "/usr/local/lib/python3.13/site-packages/github3/structs.py", line 131, in __iter__
    yield cls(i)
          ~~~^^^
  File "/usr/local/lib/python3.13/site-packages/github3/models.py", line 52, in __init__
    self._update_attributes(json)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/local/lib/python3.13/site-packages/github3/repos/release.py", line 102, in _update_attributes
    self.author = users.ShortUser(release["author"], self)
                  ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/github3/models.py", line 52, in __init__
    self._update_attributes(json)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/local/lib/python3.13/site-packages/github3/users.py", line 309, in _update_attributes
    self.avatar_url = user["avatar_url"]
                      ~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Please let me know if there's anything I can provide to help debug.

To Reproduce

Version used: v2.0.1 (d6c45761f4ee2f781251c788006d14ca48c6ec8e).

Expected behavior

N/A

Screenshots

No response

Additional context

No response

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions