My app is approved for the developer access. I am trying out twitter_ads SDK with these simple lines of python code.
# initialize the client client = Client( CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET) account = client.accounts(id=ACCOUNT_ID)
On this line above, I am getting this exception. How can I find out what went wrong?
Traceback (most recent call last):
File “twitter.py”, line 15, in
account = client.accounts(id=ACCOUNT_ID)
File “/Library/Python/2.7/site-packages/twitter_ads/client.py”, line 89, in accounts
return Account.load(self, id) if id else Account.all(self)
File “/Library/Python/2.7/site-packages/twitter_ads/account.py”, line 54, in load
return Cursor(klass, request, init_with=[client])
File “/Library/Python/2.7/site-packages/twitter_ads/cursor.py”, line 29, in init
File “/Library/Python/2.7/site-packages/twitter_ads/cursor.py”, line 91, in __from_response
File “/Library/Python/2.7/site-packages/twitter_ads/resource.py”, line 43, in from_response
value = response.get(name, None)
AttributeError: ‘unicode’ object has no attribute ‘get’
When I print out the response object, which is a string, it becomes just ‘name’.