Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login error #22

Open
MohakAoki opened this issue Jun 25, 2021 · 5 comments
Open

login error #22

MohakAoki opened this issue Jun 25, 2021 · 5 comments

Comments

@MohakAoki
Copy link

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

error is: ds_user

@MohakAoki
Copy link
Author

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

@CTKogstrom
Copy link

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.

@dogukangulyasar
Copy link

dogukangulyasar commented Jan 17, 2022

Add this code top of your file:

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

@wiserat
Copy link

wiserat commented Nov 13, 2022

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.

@niki-nakamu
Copy link

これと同じ問題に遭遇しました。私にとってうまくいった解決策は、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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants