instagram_private_api icon indicating copy to clipboard operation
instagram_private_api copied to clipboard

ClientLoginError: bad_password

Open beliboba opened this issue 2 years ago • 0 comments

Before submitting an issue, make sure you have:

  • [x] Updated to the lastest version v1.6.0
  • [x] Read the README and docs
  • [x] Searched the bugtracker for similar issues including closed ones
  • [x] Reviewed the sample code in tests and examples

Which client are you using?

  • [ ] web (instagram_web_api/)
  • [x] app (instagram_private_api/)

Describe the Bug/Error:

instagram_private_api.errors.ClientLoginError: bad_password

Paste the output of python -V here: Python 3.11.0

Code:

# Example code that will produce the error reported
from instagram_private_api import Client

bot = Client(username=settings.INSTA_LOGIN, password=settings.INSTA_PASSWORD, proxy=proxy)

Error/Debug Log:

Task exception was never retrieved
future: <Task finished name='Task-2' coro=<start() done, defined at C:\Users\Beliboba\PycharmProjects\tginsta\insta\post.py:35> exception=ClientLoginError('bad_password')>
Traceback (most recent call last):
  File "C:\Users\Beliboba\PycharmProjects\tginsta\venv\Lib\site-packages\instagram_private_api\client.py", line 523, in _call_api
    response = self.opener.open(req, timeout=self.timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Beliboba\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Beliboba\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Beliboba\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Beliboba\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\Beliboba\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Beliboba\PycharmProjects\tginsta\insta\post.py", line 43, in start
    bot = Client(username=settings.INSTA_LOGIN, password=settings.INSTA_PASSWORD, proxy=proxy)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Beliboba\PycharmProjects\tginsta\venv\Lib\site-packages\instagram_private_api\client.py", line 208, in __init__
    self.login()
  File "C:\Users\Beliboba\PycharmProjects\tginsta\venv\Lib\site-packages\instagram_private_api\endpoints\accounts.py", line 49, in login
    login_response = self._call_api(
                     ^^^^^^^^^^^^^^^
  File "C:\Users\Beliboba\PycharmProjects\tginsta\venv\Lib\site-packages\instagram_private_api\client.py", line 527, in _call_api
    ErrorHandler.process(e, error_response)
  File "C:\Users\Beliboba\PycharmProjects\tginsta\venv\Lib\site-packages\instagram_private_api\errors.py", line 123, in process
    raise error_info['error'](
instagram_private_api.errors.ClientLoginError: bad_password

beliboba avatar Oct 15 '23 13:10 beliboba