Closed xSLM closed 9 years ago
When you run this line:
my_bot = TwitterBot('***\Documents\TwitterFollowBot-master\TwitterFollowBot-master')
You're telling the bot that the config.txt
is the directory TwitterFollowBot-master
. You likely want to change that line to:
my_bot = TwitterBot('***\Documents\TwitterFollowBot-master\TwitterFollowBot-master\config.txt')
or wherever your config.txt
file is located.
Thank You. That did fix that error, however i got this error i was actually getting before this. this is to do a value being out of the range of a list the text that came up is below:
Traceback (most recent call last):
File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\mybot.py", line 4, in
I have no clue why this is happening.
Please copy and paste your config.txt here. You should anonymize your API key entries when posting it here.
On Friday, August 14, 2015, xSLM notifications@github.com wrote:
Aight I did that but i got this error i was actually getting before this. this is to do a value being out of the range of a list the text that came up is below:
Traceback (most recent call last): File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\mybot.py", line 4, in my_bot = TwitterBot('C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\config.txt') File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\TwitterFollowBotinit.py", line 42, in init self.bot_setup(config_file) File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\TwitterFollowBotinit.py", line 82, in bot_setup value = line[1].strip() IndexError: list index out of range
I have no clue why this is happening.
— Reply to this email directly or view it on GitHub https://github.com/rhiever/TwitterFollowBot/issues/71#issuecomment-131174572 .
Randal S. Olson, Ph.D. Postdoctoral Researcher, Institute for Biomedical Informatics University of Pennsylvania
E-mail: rso@randalolson.com | Twitter: @randal_olson https://twitter.com/randal_olson http://www.randalolson.com
OAUTH_TOKEN: asdasd OAUTH_SECRET: asdasd CONSUMER_KEY: asdasd CONSUMER_SECRET: asdasd TWITTER_HANDLE: a handle ALREADY_FOLLOWED_FILE:already-followed.txt FOLLOWERS_FILE:followers.txt FOLLOWS_FILE:following.txt USERS_KEEP_FOLLOWING: USERS_KEEP_UNMUTED: USERS_KEEP_MUTED: FOLLOW_BACKOFF_MIN_SECONDS:10 FOLLOW_BACKOFF_MAX_SECONDS:60
Are your keys on a separate line like that? If so, that's likely the issue. They should follow directly after the colon (:).
On Fri, Aug 14, 2015 at 1:41 PM, xSLM notifications@github.com wrote:
OAUTH_TOKEN: asdasd OAUTH_SECRET: asdasd CONSUMER_KEY: asdasd CONSUMER_SECRET: asdasd TWITTER_HANDLE: a handle ALREADY_FOLLOWED_FILE:already-followed.txt FOLLOWERS_FILE:followers.txt FOLLOWS_FILE:following.txt USERS_KEEP_FOLLOWING: USERS_KEEP_UNMUTED: USERS_KEEP_MUTED: FOLLOW_BACKOFF_MIN_SECONDS:10 FOLLOW_BACKOFF_MAX_SECONDS:60
— Reply to this email directly or view it on GitHub https://github.com/rhiever/TwitterFollowBot/issues/71#issuecomment-131191778 .
Randal S. Olson, Ph.D. Postdoctoral Researcher, Institute for Biomedical Informatics University of Pennsylvania
E-mail: rso@randalolson.com | Twitter: @randal_olson https://twitter.com/randal_olson http://www.randalolson.com
nope :/
Well, the gist of what's happening is that it's trying to parse your config.txt
and it expects every line to have a :
in it. Maybe there's an empty line at the beginning or the end of the config file?
nope :/ no line anywhere
here is what my config file looks like:
Is the USERS_KEEP_FOLLOWING
line missing a colon or is it just covered in that picture?
If that's not it, please email me your config.txt
(exactly as it is, with your keys and everything) so I can reproduce the error.
user_keep_following does have a colon. I will email you the file in question
Thanks for sending your file. I sent you back a working one. For folks looking for the solution to this in the future:
The keys and usernames were on a separate line - they must be on the same line, e.g.,
OAUTH_TOKEN:dflkhdslkfhdaskjfhdskjfhdskafjlhdsf
not
OAUTH_TOKEN:
dflkhdslkfhdaskjfhdskjfhdskafjlhdsf
There must be no extra newlines between each config.txt
entry, e.g.,
OAUTH_TOKEN:dflkhdslkfhdaskjfhdskjfhdskafjlhdsf OAUTH_SECRET:fhksdfhsfiuehieusgfies
not
OAUTH_TOKEN:dflkhdslkfhdaskjfhdskjfhdskafjlhdsf
OAUTH_SECRET:fhksdfhsfiuehieusgfies
USERS_KEEP_*
lists must be comma-separated and must be user IDs not user names. You can look up Twitter IDs from user names here: http://tweeterid.com/e.g.,
USERS_KEEP_FOLLOWING:1234,4533,3435
not
USERS_KEEP_FOLLOWING:sally_example,jobBlog,southpark
We really need to document this in the README.
On my computer i am an administrator and on checking the permissions i have read/write permissions and what not. When i tried opening this it says I don't have permission to open but I do and on checking it is not open in any other place on my computer. What do I do? Please Help!! This is my bot currently:
from TwitterFollowBot import TwitterBot
my_bot = TwitterBot('***\Documents\TwitterFollowBot-master\TwitterFollowBot-master') my_bot.auto_unfollow_all_followers()