Closed sp00 closed 11 years ago
SCREEN_NAME is a variable that gets defined by reading a command line argument from the script that you are executing. Try searching for "python sys.argv" and you should find some useful documentation on how this is used. In practice, you'll need to execute the script in a terminal and pass in an argument for it to pick up that value, or you'll need to modify the script to say something like SCREEN_NAME='foo' if you want to run it some other way. Please let me know if this helps.
ah ok - thank you so much
:)
I think we resolved this issue but never closed it, so I'll go ahead and close it now as part of some housekeeping.
Hi
Firstly, just wanted to say how fantastic the book is - and this git is just what I was looking for..
I'm learning Python as I'm going - and following all the tutorials I can. But I've hit a stumbling block, I keep getting the following message on friends_followers__get_friends.py (or other friends_followers files)
Traceback (most recent call last): File "", line 1, in
File "friends_followers__get_friends.py", line 9, in
SCREEN_NAME = sys.argv[1]
IndexError: list index out of range
I've edited the twitter__login.py file using my consumer secret / key but having found about the SCREEN_NAME
Hoping you can help
Thanks
Lee