AttributeError: 'Twython' object has no attribute 'auth' #90
Labels
No labels
Bug
Enhancement
Feature Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/twython#90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Example from the readme file fails because of undefined auth attribute.
In [1]: from twython import Twython
In [2]: twitter = Twython()
In [3]: results = twitter.search(q="beart")
AttributeError Traceback (most recent call last)
C:\projects\tweetair\tweetair in ()
----> 1 results = twitter.search(q="beart")
C:\projects\tweetair\tweetair\lib\site-packages\twython\twython.pyc in search(self, *_kwargs)
433 kwargs['q'] = urllib.quote_plus(Twython.unicode2utf8(kwargs['q']))
434
--> 435 return self.get('https://search.twitter.com/search.json', params=kwargs)
436
437 def searchGen(self, search_query, *_kwargs):
C:\projects\tweetair\tweetair\lib\site-packages\twython\twython.pyc in get(self, endpoint, params, version)
264 def get(self, endpoint, params=None, version=1):
265 params = params or {}
--> 266 return self.request(endpoint, params=params, version=version)
267
268 def post(self, endpoint, params=None, version=1):
C:\projects\tweetair\tweetair\lib\site-packages\twython\twython.pyc in request(self, endpoint, method, params, version)
258 url = '%s/%s.json' % (self.api_url % version, endpoint)
259
--> 260 content = self._request(url, method=method, params=params, api_call=url)
261
262 return content
C:\projects\tweetair\tweetair\lib\site-packages\twython\twython.pyc in _request(self, url, method, params, api_call)
203
204 func = getattr(self.client, method)
--> 205 response = func(url, data=myargs, auth=self.auth)
206 content = response.content.decode('utf-8')
207
AttributeError: 'Twython' object has no attribute 'auth'
@tdedecko Thanks for pointing this out. I'll add a fix to in my soon-Pull Request (https://github.com/michaelhelmick/twython/tree/requests_image_posting)
@tdedecko Terribly sorry about that, forgive me? ❤️
No worries. Just slowed me down for a bit trying to figure out if I did something wrong. I fixed it for my own uses. Thanks for the quick response!