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

after update - collect_stats won't work #279

Closed drfm closed 7 years ago

drfm commented 7 years ago

After I updated the files, I git this error while trying to collect the stats...

Traceback (most recent call last): File "instabot/examples/collect_stats.py", line 31, in bot.save_user_stats(args.user, path=args.path) File "C:\Python36\lib\site-packages\instabot\bot\bot.py", line 384, in save_user_stats return save_user_stats(self, username, path=path) File "C:\Python36\lib\site-packages\instabot\bot\bot_stats.py", line 45, in save_user_stats self.logger.info("Stats saved at %s." % data_to_save["date"]) UnboundLocalError: local variable 'data_to_save' referenced before assignment 2017-07-13 19:16:24,852 - INFO - Bot stopped. Worked: 1 day, 19:09:21.593086 2017-07-13 19:16:24,853 - INFO - Total followed: 150 2017-07-13 19:16:24,855 - INFO - Total requests: 9592

sudoguy commented 7 years ago

In update https://github.com/instagrambot/instabot/commit/1bba82b2d109cecdb4588f35f2da7778a1fd7823 this problem was solved

drfm commented 7 years ago

Thanks!!!

mwargan commented 7 years ago

@sudoguy Hey! I still get this same error even with the update...

Interestingly - ultimate_schedule is working fine and saving stats as expected, so I updated this line in collect_stats.py:

bot.save_user_stats(args.user, path=args.path) to bot.save_user_stats(bot.user_id), and now stats are saved.