TwitterFollowBot icon indicating copy to clipboard operation
TwitterFollowBot copied to clipboard

Bot not working

Open Deio opened this issue 9 years ago • 2 comments

I have no idea what I am doing wrong. I followed all of the instructions but my bot still wouldn't work. I have all of the right consumer numbers and outh numbers aswel. I made a python script that creates an instance of the bot. That script is called bot.py. Here is everything I have written to try and get it to work:

config.txt

OAUTH_TOKEN:
OAUTH_SECRET:
CONSUMER_KEY:
CONSUMER_SECRET://///////these are filled in on the actual file
TWITTER_HANDLE:JJimC    ///my bot
ALREADY_FOLLOWED_FILE:already-followed.txt
FOLLOWERS_FILE:followers.txt
FOLLOWS_FILE:following.txt
USERS_KEEP_FOLLOWING:234567
USERS_KEEP_UNMUTED:234567
USERS_KEEP_MUTED:123456
FOLLOW_BACKOFF_MIN_SECONDS:10
FOLLOW_BACKOFF_MAX_SECONDS:60

bot.py

 from TwitterFollowBot import TwitterBot

 my_bot = TwitterBot("/Users/user/Desktop/TwitterFollowBot-master/config.txt")
 my_bot.sync_follows()
 my_bot.auto_follow("yay")
 my_bot.auto_follow_followers()
my_bot.auto_fav("yay", count=10)
 my_bot.auto_rt("yay", count=10)


And this is my cron Job

1 * * * * python /Users/user/Desktop/TwitterFollowBot-master/bot.py

Deio avatar Apr 25 '16 18:04 Deio

Do you see any error on the terminal? You do not have to specify the path if your bot.py and config.txt are in the same directory. Most common errors are due to paths. Add the following code in your bot.py before creating the bot instance to check if the config.txt existed on this path or not:

from TwitterFollowBot import TwitterBot
import os.path
print os.path.isfile("/Users/user/Desktop/TwitterFollowBot-master/config.txt")

my_bot = TwitterBot("/Users/user/Desktop/TwitterFollowBot-master/config.txt")
 my_bot.sync_follows()
 my_bot.auto_follow("yay")
 my_bot.auto_follow_followers()
my_bot.auto_fav("yay", count=10)
 my_bot.auto_rt("yay", count=10)

HammadSiddiqui avatar Jun 03 '16 13:06 HammadSiddiqui

i am also runing into issues my i did exactly as you did and i am coming back with errors

`/usr/bin/python2.7 /home/m3lkia/PycharmProjects/killakaponebot/killacaponebot.py True Traceback (most recent call last): File "/home/m3lkia/PycharmProjects/killakaponebot/killacaponebot.py", line 6, in my_bot = TwitterBot('/home/m3lkia/PycharmProjects/killakaponebot/config.txt') File "/usr/lib/python2.7/site-packages/TwitterFollowBot/init.py", line 42, in init self.bot_setup(config_file) File "/usr/lib/python2.7/site-packages/TwitterFollowBot/init.py", line 86, in bot_setup self.BOT_CONFIG[parameter] = set([int(x) for x in value.split(",")]) ValueError: invalid literal for int() with base 10: ''

Process finished with exit code 1

`

ghost avatar Jun 17 '16 09:06 ghost