ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.69k stars 1.47k forks source link

disable file creation in root dir #1035

Closed lxknvlk closed 4 years ago

lxknvlk commented 5 years ago

Whenever i run my main.py file where i use instabot, it creates lots of different files in the directory. How can i disable this?

lxknvlk commented 5 years ago

setting bot.base_path does not work. I have tried next variants, none worked:

bot.base_path = "libfiles" bot.base_path = "libfiles/" bot.base_path = "/libfiles" bot.base_path = "/libfiles/" bot.base_path = "./libfiles/"

lxknvlk commented 5 years ago

also setting next params does not stop the bot from creating the files

bot.blacklist_file = ""
bot.whitelist_file = ""
bot.comments_file = ""
bot.unfollowed_file = ""
bot.skipped_file = ""
bot.followed_file = ""
lxknvlk commented 5 years ago

also setting files like this does not help:

base_dir = "libfiles/"
bot.base_path = base_dir
bot.blacklist_file = base_dir + "blacklist.txt"
bot.whitelist_file = base_dir + "whitelist.txt"
bot.comments_file = base_dir + "comments.txt"
bot.unfollowed_file = base_dir + "unfollowed.txt"
bot.skipped_file = base_dir + "skipped.txt"
bot.followed_file = base_dir + "followed.txt"

There must be some kind of a bug

ohld commented 4 years ago

... or some kind of shitcode. We need a contributor to implement a more elegant way to solve this.

noxevolution commented 4 years ago

I have the same problem. I managed to create the other files in a different folder but the config & log folder & 2 other files are still getting created on the root folder.

bot = Bot(
            whitelist_file=util_path + '/whitelist.txt',
            blacklist_file=util_path + '/blacklist.txt',
            comments_file=util_path + '/comments.txt',
            followed_file=util_path + '/followed.txt',
            unfollowed_file=util_path + '/unfollowed.txt',
            skipped_file=util_path + '/skipped.txt',
            friends_file=util_path + '/friends.txt',
)  

Whenever i try to use the parameter base_path here i am getting "No such file or directory" error.

bruvv commented 4 years ago

Since this is very old issue I am going to close this. If this is still an issue please reopen a new issue.