danielpronych / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

'list' object has no attribute 'encode' #195

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,
i receive this strange error:
>>> api = twitter.Api(consumer_key=consumer_key, 
consumer_secret=consumer_secret, access_token_key=dati_user['oauth_token'], 
access_token_secret=dati_user['oauth_token_secret'])
>>> api
<twitter.Api object at 0x10218a910>
>>> api.VerifyCredentials()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Volumes/duc/Sites/django/met_env/lib/python2.6/site-packages/twitter.py", line 3447, in VerifyCredentials
    json = self._FetchUrl(url, no_cache=True)
  File "/Volumes/duc/Sites/django/met_env/lib/python2.6/site-packages/twitter.py", line 3763, in _FetchUrl
    req.sign_request(self._signature_method_hmac_sha1, self._oauth_consumer, self._oauth_token)
  File "/Volumes/duc/Sites/django/met_env/lib/python2.6/site-packages/oauth2/__init__.py", line 502, in sign_request
    self['oauth_signature'] = signature_method.sign(self, consumer, token)
  File "/Volumes/duc/Sites/django/met_env/lib/python2.6/site-packages/oauth2/__init__.py", line 838, in sign
    key, raw = self.signing_base(request, consumer, token)
  File "/Volumes/duc/Sites/django/met_env/lib/python2.6/site-packages/oauth2/__init__.py", line 832, in signing_base
    key += escape(token.secret)
  File "/Volumes/duc/Sites/django/met_env/lib/python2.6/site-packages/oauth2/__init__.py", line 158, in escape
    return urllib.quote(s.encode('utf-8'), safe='~')
AttributeError: 'list' object has no attribute 'encode'

or with postStatusUpdate.

Original issue reported on code.google.com by keit...@libero.it on 18 Apr 2011 at 1:02

GoogleCodeExporter commented 8 years ago
hmm, let me look at that tomorrow night. it may be an issue with 2.6 or one of 
the libs.

can you list what version of python-twitter and the required libs you are using?

Original comment by bear42 on 18 Apr 2011 at 5:30

GoogleCodeExporter commented 8 years ago
Hi,
>>> twitter.__version__
'0.8.2'
>>> oauth2.__version__
LooseVersion ('1.5.169')
>>> httplib2.__version__
'$Rev$'
>>> simplejson.__version__
'2.1.5'

Original comment by keit...@libero.it on 18 Apr 2011 at 10:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,
Sorry for this issue but is a my problem because i'm passing a list instead of 
'str'.
Close. 

Original comment by keit...@libero.it on 12 May 2011 at 10:02

GoogleCodeExporter commented 8 years ago
thanks for letting us know

Original comment by bear42 on 14 May 2011 at 5:01