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

[BUG] bot.login(ask_for_code=True) results in KeyError: 'ds_user_id' #1327

Closed janvarsa closed 4 years ago

janvarsa commented 4 years ago

Example file

If you ran an example file specify it here.

Describe the bug

Trying either of the lines below results in KeyError: 'ds_user_id':

bot.login(ask_for_code=True) OR bot.login(username=username, password=password)

Error:

2020-02-26 21:47:31,617 - INFO - Not yet logged in starting: PRE-LOGIN FLOW! Traceback (most recent call last): File "autobot.py", line 21, in bot.login(ask_for_code=True) File "C:\Users\jvars.conda\envs\insta-env\lib\site-packages\instabot\bot\bot.py", line 443, in login if self.api.login(**args) is False: File "C:\Users\jvars.conda\envs\insta-env\lib\site-packages\instabot\api\api.py", line 266, in login self.pre_login_flow() File "C:\Users\jvars.conda\envs\insta-env\lib\site-packages\instabot\api\api.py", line 182, in pre_login_flow return pre_login_flow(self) File "C:\Users\jvars.conda\envs\insta-env\lib\site-packages\instabot\api\api_login.py", line 107, in pre_login_flow self.sync_device_features() File "C:\Users\jvars.conda\envs\insta-env\lib\site-packages\instabot\api\api.py", line 155, in sync_device_features return sync_device_features(self, login) File "C:\Users\jvars.conda\envs\insta-env\lib\site-packages\instabot\api\api_login.py", line 23, in sync_device_features data["_uid"] = self.user_id File "C:\Users\jvars.conda\envs\insta-env\lib\site-packages\instabot\api\api.py", line 616, in user_id return self.cookie_dict["ds_user_id"] KeyError: 'ds_user_id'

Log

No log is generated - error occurs before login.

To Reproduce

from instabot import Bot bot = Bot() bot.login(ask_for_code=True)

Expected behavior

Login is successful and script continues.

Additional context

I have previously logged in consistently without issues. However, my last login attempt prior to this issue logged a different error (I have inserted some x's below just in case the data is sensitive):

2020-02-26 15:22:00,562 - INFO - Instabot Started 2020-02-26 15:22:00,565 - INFO - Recovery from xxxxxxx_uuid_and_cookie.json: COOKIE True - UUIDs True - TIMING, DEVICE and ...

Version

Python version: 3.8.1 OS: Win 10

bruvv commented 4 years ago

Had been posted already https://github.com/instagrambot/instabot/issues/1317