gfcapalbo / python-twitter

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

AttributeError: 'unicode' object has no attribute 'get' in NewFromJsonDict() #235

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Auth API
2. users = api.UsersLookup(<USER ID or Name>)

What is the expected output? What do you see instead?
Expected a twitter.User object returned for each UserID or Name, but instead 
receive an error:

Traceback (most recent call last):
  File "trial.py", line 40, in <module>
    users = api.UsersLookup('XXXXXX')
  File "/usr/local/lib/python2.7/dist-packages/python_twitter-0.8.2-py2.7.egg/twitter.py", line 3049, in UsersLookup
    return [User.NewFromJsonDict(u) for u in data]
  File "/usr/local/lib/python2.7/dist-packages/python_twitter-0.8.2-py2.7.egg/twitter.py", line 1340, in NewFromJsonDict
    return User(id=data.get('id', None),
AttributeError: 'unicode' object has no attribute 'get''

What version of the product are you using? On what operating system?
Using version 0.8.2 and I have tried on both Windows and Linux (Ubuntu)

Please provide any additional information below.
I have tested using both ID's and Names along with a list of ID's and all 
report the same error.

Original issue reported on code.google.com by hu...@hurgh.org on 30 Jul 2012 at 4:13

GoogleCodeExporter commented 9 years ago
I receive this error as well, same version as above on Windows

Original comment by ace...@gmail.com on 4 Aug 2012 at 6:11