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

get_stats_contributors raises a max recursion error that takes 35 minutes ! #2254

Open
iskode opened this issue Jun 12, 2022 · 1 comment
Open

Comments

@iskode
Copy link

iskode commented Jun 12, 2022

Calling get_stats_contributors on some repositories fails with max recursion error and it takes 35 minutes consistently (many trials) before raising this error.
I'm using the pygithub v1.55 (latest stable version from my knowledge).
Below is a step by step instruction to reproduce the error:

from github import Github
gh = Github(token)
repo_name = "digit-soft/laravel-i18n"
repo = gh.get_repo(repo_name)
response = repo.get_stats_contributors()
# takes 35 minutes before raising max recursion error

Following are some other repositories that raise this error:
repo_names=["Dan0sz/ResourceHints-magento2", "kos-v/yii2-jquery-fix-clone", "ElaineKoo/weather"]

A general hint I've got while inspecting few github repos of these projects is that they are kind of no more maintained.
Can you help address this issue as I have script that processes a list of repositories ? So this slows down (if not kills) my work.
Or at least, is there any check I can do with the API so that I can anticipate such behavior and consequently skip these repositories?

Thank you so much for your dedication to help us !

@nikozoe
Copy link

nikozoe commented Jun 14, 2022

I'm having the same problem. When using the GitHub rest API directly via curl get request, the request returns an empty json. So my guess is, that it is a problem with the GitHub API itself. However, it would be good if pygithub would handle this differently.
Example:
curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token MYTOKEN" https://api.github.com/repos/PicciMario/iPhone-Backup-Analyzer-2/stats/contributors
The HTTP status code is 202. This might be related to #1862 and #1108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants