rhiever / TwitterFollowBot

A Python bot that automates several actions on Twitter, such as following users and favoriting tweets.
GNU General Public License v3.0
1.3k stars 448 forks source link

Error when running script #116

Open aediot opened 7 years ago

aediot commented 7 years ago

Hello,

When trying to run the Twitter bot I get the error below:

[aediot@server TwitterFollowBot]$ python yourscript.py Traceback (most recent call last): File "yourscript.py", line 4, in my_bot = TwitterBot() File "/usr/lib/python3.5/site-packages/TwitterFollowBot/init.py", line 42, in init self.bot_setup(config_file) File "/usr/lib/python3.5/site-packages/TwitterFollowBot/init.py", line 82, in bot_setup value = line[1].strip() IndexError: list index out of range

Here is my yourscript.py:

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()

my_bot.auto_fav("test", count=1000) my_bot.auto_follow_followers() my_bot.auto_unfollow_nonfollowers()

And here is my config.txt in the same directory:

OAUTH_TOKEN:7example OAUTH_SECRET:example CONSUMER_KEY:example CONSUMER_SECRET:example TWITTER_HANDLE:delevrything 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

tunnelsup commented 7 years ago

Check your config.txt file for extra whitespaces. Even an extra new line at the end can cause this problem.

This is a duplicate of issue https://github.com/rhiever/TwitterFollowBot/issues/82