docs icon indicating copy to clipboard operation
docs copied to clipboard

login error

Open MohakAoki opened this issue 4 years ago • 5 comments

python 3.9 Code: from instabot import Bot bot = Bot() bot.login(username="username", password="password")

error is: ds_user

MohakAoki avatar Jun 25 '21 08:06 MohakAoki

and, for the first time, it logged in correctly. for the second time it throws error

MohakAoki avatar Jun 25 '21 08:06 MohakAoki

I ran into this same issue. For me the solution that worked was deleting the config directory that gets created on bot.login(). For some reason the data stored in this directory is not aligned with the api and throws the ds_user error.

CTKogstrom avatar Nov 01 '21 00:11 CTKogstrom

Add this code top of your file:

import os 
import glob
cookie_del = glob.glob("config/*cookie.json")
os.remove(cookie_del[0])

dogukangulyasar avatar Jan 17 '22 19:01 dogukangulyasar

import os import glob cookie_del = glob.glob("config/*cookie.json") os.remove(cookie_del[0])

This is not working for me. I had to put it into try, except because then I would have index error. But I still get 429 errors.

wiserat avatar Nov 13 '22 10:11 wiserat

これと同じ問題に遭遇しました。私にとってうまくいった解決策は、bot.login() で作成される config ディレクトリを削除することでした。何らかの理由で、このディレクトリに保存されているデータは API と一致していないため、ds_user エラーがスローされます。

`import shutil

Instabotを初期化

from instabot import Bot my_bot = Bot()

ログインを試行し、configディレクトリを作成

my_bot.login(username="YourUsername", password="YourPassword")

configディレクトリを再帰的に削除

shutil.rmtree('config') ` I have the same problem. Is this what you mean?

niki-nakamu avatar Nov 22 '23 10:11 niki-nakamu