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

a little help about rate limit #1

Open
wanghaisheng opened this issue Apr 26, 2023 · 0 comments
Open

a little help about rate limit #1

wanghaisheng opened this issue Apr 26, 2023 · 0 comments

Comments

@wanghaisheng
Copy link

Run python src/github_scraper.py --queries=${keywords} --path=${outdir}
  python src/github_scraper.py --queries=${keywords} --path=${outdir}
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.9.16/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.16/x64/lib
    hashtags: 
    outdir: 
    GITHUB_TOKEN: ***
--Data scraping starting

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
midjourney Repo Scrape:   0%|          | 1/1000 [00:01<[2](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:2)[3](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:3):37,  1.[4](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:4)2s/it]
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
midjourney Repo Scrape:   0%|          | 2/1000 [00:01<1[5](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:5):21,  1.08it/s]
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   0%|          | 3/1000 [00:02<12:00,  1.38it/s]

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 4/1000 [00:03<10:47,  1.54it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
midjourney Repo Scrape:   0%|          | 5/1000 [00:03<09:58,  1.[6](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:6)6it/s]
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   1%|          | 6/1000 [00:04<09:50,  1.68it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   1%|          | [7](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:7)/1000 [00:04<09:21,  1.77it/s]
repo search results counts 1000

should we wait??
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   1%|          | [8](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:8)/1000 [00:05<0[9](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:9):15,  1.79it/s]
repo search results counts [10](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:11)00
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   1%|          | 9/1000 [00:05<09:07,  1.81it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
midjourney Repo Scrape:   1%|          | 10/1000 [00:06<09:10,  1.80it/s]
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
should we wait??
midjourney Repo Scrape:   1%|          | [11](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:12)/1000 [00:06<08:49,  1.87it/s]

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   1%|          | [12](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:13)/1000 [00:07<08:46,  1.88it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   1%|▏         | [13](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:14)/1000 [00:07<08:39,  1.90it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   1%|▏         | [14](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:15)/1000 [00:08<08:28,  1.94it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
should we wait??
midjourney Repo Scrape:   2%|▏         | [15](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:16)/1000 [00:08<08:[16](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:17),  1.98it/s]

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
should we wait??
midjourney Repo Scrape:   2%|▏         | 16/1000 [00:09<08:26,  1.94it/s]

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   2%|▏         | [17](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:18)/1000 [00:09<08:23,  1.95it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   2%|▏         | [18](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:19)/1000 [00:10<08:23,  1.95it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   2%|▏         | [19](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:20)/1000 [00:10<08:08,  2.01it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
should we wait??
midjourney Repo Scrape:   2%|▏         | [20](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:21)/1000 [00:11<08:14,  1.98it/s]

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   2%|▏         | [21](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:22)/1000 [00:11<08:11,  1.99it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   2%|▏         | [22](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:23)/1000 [00:12<08:00,  2.03it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
midjourney Repo Scrape:   2%|▏         | [23](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:24)/1000 [00:12<08:09,  1.99it/s]
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
midjourney Repo Scrape:   2%|▏         | [24](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:25)/1000 [00:13<08:30,  1.91it/s]
should we wait??

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

repo search results counts 1000
midjourney Repo Scrape:   2%|▎         | [25](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:26)/1000 [00:13<08:23,  1.94it/s]

should we wait??
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   3%|▎         | [26](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:27)/1000 [00:14<08:26,  1.92it/s]
repo search results counts 1000

should we wait??
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   3%|▎         | [27](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:28)/1000 [00:14<08:20,  1.94it/s]
repo search results counts 1000

should we wait??
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   3%|▎         | [28](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:29)/1000 [00:15<08:22,  1.94it/s]

midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
repo search results counts 1000
should we wait??

midjourney Repo Scrape:   3%|▎         | [29](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:30)/1000 [00:15<08:12,  1.97it/s]
repo search results counts 1000

should we wait??
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]
midjourney Repo Scrape:   0%|          | 0/1000 [00:00<?, ?it/s]

midjourney Repo Scrape:   3%|▎         | [30](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:31)/1000 [00:16<07:50,  2.06it/s]
midjourney Repo Scrape:   3%|▎         | 30/1000 [00:16<08:51,  1.83it/s]
repo search results counts 1000
should we wait??
Traceback (most recent call last):
  File "/home/runner/work/github-action-top-repo-analysis/github-action-top-repo-analysis/src/github_scraper.py", line 396, in <module>
    main(
  File "/home/runner/work/github-action-top-repo-analysis/github-action-top-repo-analysis/src/github_scraper.py", line [33](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:34)9, in main
    github_data = scrape_github(token, queries, sort, order, num)
  File "/home/runner/work/github-action-top-repo-analysis/github-action-top-repo-analysis/src/github_scraper.py", line 191, in scrape_github
    top_repos = get_top_repos(g, query, sort=sort, order=order, num=num)
  File "/home/runner/work/github-action-top-repo-analysis/github-action-top-repo-analysis/src/github_scraper.py", line 82, in get_top_repos
    for repo in tqdm(repos, desc=f"{query} Repo Scrape", total=num):
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/tqdm/std.py", line 1180, in __iter__
    for obj in iterable:
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/github/PaginatedList.py", line 82, in __iter__
    yield self.__list[index]
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/github/PaginatedList.py", line 48, in __getitem__
    self.__fetchToIndex(index)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/github/PaginatedList.py", line 64, in __fetchToIndex
    self._grow()
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/github/PaginatedList.py", line 67, in _grow
    newElements = self._fetchNextPage()
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/github/PaginatedList.py", line 199, in _fetchNextPage
    headers, data = self.__requester.requestJsonAndCheck(
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/github/Requester.py", line [35](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:36)3, in requestJsonAndCheck
    return self.__check(
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/github/Requester.py", line [37](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:38)8, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.RateLimitExceededException: [40](https://github.com/gpt-university/github-action-top-repo-analysis/actions/runs/4806682309/jobs/8554498074#step:5:41)3 {"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."}

I have adapted your code to run against github action,
https://github.com/gpt-university/github-action-top-repo-analysis/blob/main/src/github_scraper.py

but it seems check_rate_limit did not run at all

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

1 participant