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

Over capacity #1558

Closed
adrmnv opened this issue Mar 31, 2021 · 3 comments
Closed

Over capacity #1558

adrmnv opened this issue Mar 31, 2021 · 3 comments
Labels
API This is regarding Twitter's API

Comments

@adrmnv
Copy link

adrmnv commented Mar 31, 2021

Code:

import tweepy

consumer_key = ""
consumer_secret = ""
access_token = ""
access_token_secret =""

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True, compression=True)

ids = []

for page in tweepy.Cursor(api.followers_ids, screen_name="TicTocTick").pages():
    ids.extend(page)

Error:

Traceback (most recent call last):
  File "C:\Users\Andrey\Desktop\twitter_brook\program.py", line 17, in <module>
    for page in tweepy.Cursor(api.followers_ids, screen_name="TicTocTick").pages():
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\tweepy\cursor.py", line 51, in __next__
    return self.next()
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\tweepy\cursor.py", line 75, in next
    data, cursors = self.method(cursor=self.next_cursor,
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\tweepy\binder.py", line 253, in _call
    return method.execute()
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\tweepy\binder.py", line 234, in execute
    raise TweepError(error_msg, resp, api_code=api_error_code)
tweepy.error.TweepError: [{'message': 'Over capacity', 'code': 130}]

@Harmon758
Copy link
Member

This is an error response from Twitter's API, with 130 and "Over capacity" referring to Twitter / the API itself being temporarily over capacity, rather than an issue with Tweepy.
See https://developer.twitter.com/en/support/twitter-api/error-troubleshooting#error-codes.

@Harmon758 Harmon758 added the API This is regarding Twitter's API label Mar 31, 2021
@adrmnv
Copy link
Author

adrmnv commented Mar 31, 2021

How to solve this problem?

@Harmon758
Copy link
Member

Again, it's an issue on Twitter's end. There's nothing to do but wait until it's no longer over capacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API This is regarding Twitter's API
Projects
None yet
Development

No branches or pull requests

2 participants