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

[BUG] : instagrapi.exceptions.UnknownError: We couldn't find an account with the username #1885

Open
astreffect opened this issue Apr 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@astreffect
Copy link

Describe the bug
Even with a paid proxy server, when I login using proxy on browser, it logins but with instagraphi & same proxy, its throwing :
instagrapi.exceptions.UnknownError: We couldn't find an account with the username

To Reproduce
cl = Client()
cl.handle_exception = handle_exception
cl.set_proxy("http://:@p.webshare.io:80")
cl.login("", "")
print("Login Successful")

Traceback
Traceback (most recent call last):
File "/home/azure/.local/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 359, in _send_private_request
response.raise_for_status()
File "/home/azure/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/azure/insta/bg.py", line 83, in
cl.login("zailoox1", "lloooura543@")
File "/home/azure/.local/lib/python3.10/site-packages/instagrapi/mixins/auth.py", line 441, in login
logged = self.private_request("accounts/login/", data, login=True)
File "/home/azure/.local/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 537, in private_request
self.handle_exception(self, e)
File "/home/azure/insta/bg.py", line 78, in handle_exception
raise e
File "/home/azure/.local/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 526, in private_request
self._send_private_request(endpoint, **kwargs)
File "/home/azure/.local/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 448, in _send_private_request
raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: We couldn't find an account with the username zailoox1. Check the username you entered and try again.

Expected behavior
I want it to work as its not a case of ip blocking since it works when I use the same proxy in opera. But may be some other detection.

Desktop (please complete the following information):

  • OS: [ Ubuntu 22.04]
  • Python version [ 3.10.2]
  • instagrapi version :2.1.1

Additional context
Also I want to know how many user IDs should I switch between a day as I plan on running a scrapping task 24 x 7 over server.

@astreffect astreffect added the bug Something isn't working label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant