Skip to content
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

Crash whilst generating report #258

Open
skye-pp opened this issue Jan 7, 2025 · 4 comments
Open

Crash whilst generating report #258

skye-pp opened this issue Jan 7, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@skye-pp
Copy link

skye-pp commented Jan 7, 2025

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

@skye-pp skye-pp added the bug Something isn't working label Jan 7, 2025
@jmeridth jmeridth self-assigned this Jan 7, 2025
@jmeridth
Copy link
Member

jmeridth commented Jan 7, 2025

@skye-pp thanks for raising this error. I'm looking into it now.

@jmeridth
Copy link
Member

jmeridth commented Jan 7, 2025

Found a different issue, getting that merged and released. But we are aware of rate limiting needed (reference github/github-ospo#77). I'll work on it this weekend. Again, thank you for raising the flag.

@skye-pp
Copy link
Author

skye-pp commented Jan 7, 2025

Thanks! Just to make sure I understand, are you saying you think the error is related to rate limiting, or it was related to the separate issue you found and fixed?

@jmeridth
Copy link
Member

jmeridth commented Jan 7, 2025

@skye-pp I believe your trace lends towards rate limiting. You wouldn't have authenticated successfully (when using a PAT) if it was the other issue (fixed with 2.1.0 release). If you want to pull 2.1.0 and retry, that'd be appreciated to confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants