bonzanini / Book-SocialMediaMiningPython

Companion code for the book "Mastering Social Media Mining with Python"
548 stars 264 forks source link

twitter_get_user_timeline.py #9

Closed christophjones closed 6 years ago

christophjones commented 6 years ago

I'm able to run get_home_timeline.py but user_timeline erros with the following. Any guidance is appreciated.

runfile('C:/Users/chris/Documents/DataMiningWithPython/Book-SocialMediaMiningPython-master/Chap02-03/twitter_get_user_timeline.py', wdir='C:/Users/chris/Documents/DataMiningWithPython/Book-SocialMediaMiningPython-master/Chap02-03') Reloaded modules: twitter_client sys argv: ['C:/Users/chris/Documents/DataMiningWithPython/Book-SocialMediaMiningPython-master/Chap02-03/twitter_get_user_timeline.py'] Usage: python C:/Users/chris/Documents/DataMiningWithPython/Book-SocialMediaMiningPython-master/Chap02-03/twitter_get_user_timeline.py An exception has occurred, use %tb to see the full traceback.

SystemExit: 1

C:\Users\chris\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:2889: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

bonzanini commented 6 years ago

How do you run the script?

When you run from the command line, the script expects the twitter username as first argument, e.g.

python twitter_get_user_timeline.py marcobonzanini

christophjones commented 6 years ago

That's the problem, I was running it from the script editor in Spyder and not entering the username. It works when I run it from command line. I need to find a way to enter the argument in editor. Thanks

On Thu, Nov 16, 2017 at 1:38 AM, Marco Bonzanini notifications@github.com wrote:

How do you run the script?

When you run from the command line, the script expects the twitter username as first argument, e.g.

python twitter_get_user_timeline.py marcobonzanini

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bonzanini/Book-SocialMediaMiningPython/issues/9#issuecomment-344840433, or mute the thread https://github.com/notifications/unsubscribe-auth/AgBOJDLxc5NYnpYn0ovgZSXmE91FoYXtks5s2-Z_gaJpZM4Qf3XL .

bonzanini commented 6 years ago

Using the menu Run -> Configuration per file (or Run -> Configure depending on the version of your editor), you can specify the command line options.

Hope this helps

christophjones commented 6 years ago

perfect. thanks again

On Fri, Nov 17, 2017 at 10:15 AM, Marco Bonzanini notifications@github.com wrote:

Using the menu Run -> Configuration per file (or Run -> Configure depending on the version of your editor), you can specify the command line options.

Hope this helps

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bonzanini/Book-SocialMediaMiningPython/issues/9#issuecomment-345288130, or mute the thread https://github.com/notifications/unsubscribe-auth/AgBOJJIiDVQOUMfu_Gs7ONf-tLy71ArFks5s3bEqgaJpZM4Qf3XL .