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 ...
device_id=android-xxxxxxx
2020-02-26 15:22:00,565 - INFO - LOGIN FLOW! Just logged-in: False
2020-02-26 15:22:00,710 - ERROR - Request returns 429 error!
2020-02-26 15:22:00,710 - WARNING - That means 'too many requests'. I'll go to sleep for 1 minutes.
Example file
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