You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
Not sure why, when or how this started happening, but if I just do self.twitter = twitter.Api() my code has a bad time:
File "/var/cron/stats/reach.py", line 30, in __init__
self.twitter = twitter.Api()
File "/usr/local/lib/python2.7/dist-packages/twitter.py", line 2350, in __init__
self.SetCredentials(consumer_key, consumer_secret, access_token_key, access_token_secret)
File "/usr/local/lib/python2.7/dist-packages/twitter.py", line 2382, in SetCredentials
self._config = self.GetHelpConfiguration()
File "/usr/local/lib/python2.7/dist-packages/twitter.py", line 2386, in GetHelpConfiguration
json = self._RequestUrl(url, 'GET')
File "/usr/local/lib/python2.7/dist-packages/twitter.py", line 4974, in _RequestUrl
auth=self.__auth,
AttributeError: 'Api' object has no attribute '_Api__auth'
But if I use twitter.Api with named params then it's all good:
api = twitter.Api(
consumer_key=self.config['twitter']['consumer_key'],
consumer_secret=self.config['twitter']['consumer_secret'],
access_token_key=post['oauth_token'],
access_token_secret=post['oauth_token_secret']
)
The first example was taken from your readme, so it should work.