waka-readme-stats: Exception: Query 'repo_commit_list' failed to run by returning code of 403: 'message': 'You have exceeded a secondary rate limit. Please wait a few minutes before you try again.'
Describe the bug I find it difficult to describe what caused the bug. Apparently, some requests are executed too often, and it is necessary to add a pause between them.
To Reproduce Just check this log https://github.com/SemenMartynov/SemenMartynov/actions/runs/4421561355/jobs/7772242992
Traceback (most recent call last):
File "/waka-readme-stats/main.py", line 221, in <module>
run(main())
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/waka-readme-stats/main.py", line 208, in main
stats = await get_stats()
^^^^^^^^^^^^^^^^^
File "/waka-readme-stats/main.py", line 156, in get_stats
yearly_data, commit_data = await calculate_commit_data(repositories)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/waka-readme-stats/yearly_commit_calculator.py", line 37, in calculate_commit_data
await update_data_with_commit_stats(repo, yearly_data, date_data)
File "/waka-readme-stats/yearly_commit_calculator.py", line 63, in update_data_with_commit_stats
commit_data = await DM.get_remote_graphql("repo_commit_list", owner=owner, name=repo_details["name"], branch=branch["name"], id=GHM.USER.node_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/waka-readme-stats/manager_download.py", line 293, in get_remote_graphql
res = await DownloadManager._fetch_graphql_paginated(query, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/waka-readme-stats/manager_download.py", line 267, in _fetch_graphql_paginated
initial_query_response = await DownloadManager._fetch_graphql_query(query, **kwargs, pagination="first: 100")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/waka-readme-stats/manager_download.py", line 231, in _fetch_graphql_query
raise Exception(f"Query '{query}' failed to run by returning code of {res.status_code}: {res.json()}")
Exception: Query 'repo_commit_list' failed to run by returning code of 403: {'documentation_url': 'https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits', 'message': 'You have exceeded a secondary rate limit. Please wait a few minutes before you try again.'}
sys:1: RuntimeWarning: coroutine 'AsyncClient.get' was never awaited
##[debug]Docker Action run completed with exit code 1
Expected behavior To make everything work as it used to.)
Github repository link If applicable, please share the Github repository link.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 16 (1 by maintainers)
Thanks for confirming @ssoad!