0

I am trying to run the Twython examples in the core_examples folder and I get the same error on all the files.

If I run the file: weekly_trends.py I get the error:

'Twython' object has no attribute 'weekly_trends.py'.

If I run the file: getCurrentTrends.py I get the error:

'Twython' object has no attribute 'getCurrentTrends'.

I have tried running the code on my Raspberry Pi and OSX and I get the same error. I assume I am missing a key part of the installation process or the authentication. I have a Twitter App setup and I have the keys and tokens. Do I need to enter these anywhere to get it to work? I got Tweepy working but Twython looks like it may have the ability to add images to tweets.

Any tips would be appreciated.

Jared
  • 25,627
  • 7
  • 56
  • 61
jumpwire
  • 101
  • 1
  • 9

1 Answers1

0

Hmmm, we don't have core_examples in the repo anymore, so I'm not sure what version of Twython you're running. For reference, those keys you have need to be used in the Twython instantiation, ala:

from twython import Twython
t = Twython(app_key, app_secret, oauth_token, oauth_token_secret)
auth_tokens = t.get_authorized_tokens(oauth_verifier)
print auth_tokens
# method calls, etc...

Apologies on seeing this so late, SO slips away from me when work takes over my life. Hope you're on your way!

Ryan McGrath
  • 2,042
  • 14
  • 23