Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

chatgpt.errors.ChatgptError: Login error. Try again or use interceptor.js as explained in the documentation. #28

Open
Kuduxaaa opened this issue Dec 27, 2022 · 8 comments

Comments

@Kuduxaaa
Copy link

Kuduxaaa commented Dec 27, 2022

i have this error chatgpt.errors.ChatgptError: Login error. Try again or use interceptor.js as explained in the documentation. when i run the script

@whyakari
Copy link

i have this error chatgpt.errors.ChatgptError: Login error. Try again or use interceptor.js as explained in the documentation. when i run the script

me too

@danielcerk
Copy link

i have this error chatgpt.errors.ChatgptError: Login error. Try again or use interceptor.js as explained in the documentation. when i run the script

The error is caused due to OpenAI login update process

@hardik-goel
Copy link

@dcgo15 could you please explain more on this?
Do we have a workaround to establish a login connection?

@BlitzJB
Copy link

BlitzJB commented Dec 29, 2022

+1

@Karlheinzniebuhr
Copy link

Karlheinzniebuhr commented Jan 6, 2023

My login error

The above exception was the direct cause of the following exception:

ChatgptError                              Traceback (most recent call last)
File c:\ProgramData\Anaconda3\lib\site-packages\chatgpt\chatgpt.py:321, in Conversation.chat(self, message, retry_on_401, direct_response, stream)
    320 if self._access_token is None and self._email and self._password:
--> 321     self.login(self._email, self._password)
    323 if self._access_token is None:

File c:\ProgramData\Anaconda3\lib\site-packages\chatgpt\chatgpt.py:178, in Conversation.login(self, email, password)
    177 self._password = password
--> 178 session_info = self._openai_authentication.login(email, password)
    179 return self._process_chatgpt_session(session_info)

File c:\ProgramData\Anaconda3\lib\site-packages\chatgpt\authentication.py:156, in OpenAIAuthentication.login(self, username, password)
    155 except HTTPTLSError as err:
--> 156     raise ChatgptError("Login error. Try again or use interceptor.js as explained in the documentation.",
    157                        ChatgptErrorCodes.LOGIN_ERROR) from err

ChatgptError: Login error. Try again or use interceptor.js as explained in the documentation.

During handling of the above exception, another exception occurred:

ChatgptError                              Traceback (most recent call last)
c:\dev\DMonitor\openai.ipynb Cell 1 in <cell line: 9>()
      [6](vscode-notebook-cell:/c%3A/dev/DMonitor/openai.ipynb#W1sZmlsZQ%3D%3D?line=5) conversation = Conversation()
      [8](vscode-notebook-cell:/c%3A/dev/DMonitor/openai.ipynb#W1sZmlsZQ%3D%3D?line=7) # Stream the message as it arrives.
----> [9](vscode-notebook-cell:/c%3A/dev/DMonitor/openai.ipynb#W1sZmlsZQ%3D%3D?line=8) for chunk in conversation.stream("We are going to start a conversation. I will speak English and you will speak Portuguese."):
     [10](vscode-notebook-cell:/c%3A/dev/DMonitor/openai.ipynb#W1sZmlsZQ%3D%3D?line=9)     print(chunk, end="")
     [11](vscode-notebook-cell:/c%3A/dev/DMonitor/openai.ipynb#W1sZmlsZQ%3D%3D?line=10)     sys.stdout.flush()

File c:\ProgramData\Anaconda3\lib\site-packages\chatgpt\chatgpt.py:267, in Conversation.stream(self, message, retry_on_401, only_new_characters)
    265 stream_text_result = ""
    266 chunk_buffer = ""
--> 267 response = self.chat(message, retry_on_401, True, True)
    268 for chunk in response.iter_content(chunk_size=1024):
    269     chunk_buffer += chunk.decode("utf-8").replace("data: ", "")

File c:\ProgramData\Anaconda3\lib\site-packages\chatgpt\chatgpt.py:410, in Conversation.chat(self, message, retry_on_401, direct_response, stream)
    408         return self.chat(message, False, direct_response=direct_response, stream=stream)
    409     elif (exception_code == ChatgptErrorCodes.LOGIN_ERROR or exception_code == ChatgptErrorCodes.TIMEOUT_ERROR) and retry_on_401:
--> 410         return self.chat(message, False, direct_response=direct_response, stream=stream)
    412 except TLSClientExeption as ex:
    413     exception_message = str(ex)

File c:\ProgramData\Anaconda3\lib\site-packages\chatgpt\chatgpt.py:420, in Conversation.chat(self, message, retry_on_401, direct_response, stream)
    417     exception_message = str(e)
    418     exception_code = ChatgptErrorCodes.UNKNOWN_ERROR
--> 420 raise ChatgptError(
    421     exception_message, exception_code)

ChatgptError: Login error. Try again or use interceptor.js as explained in the documentation.

@alexlaverty
Copy link

alexlaverty commented Jan 7, 2023

I'm receiving the same error, is this due to the "I'm not a Robot" reCAPTCHA field on the ChatGPT login page?

@volpatoo
Copy link

volpatoo commented Jan 9, 2023

Has someone fixed this issue?

@skskcco2o17
Copy link

skskcco2o17 commented Jan 12, 2023

I got the workaround i.e. using access token instead of userid/pwd in config.json.
Access token can be found from https://chat.openai.com/api/auth/session after login using uid/pwd & captcha in the same browser.
But after that I got 403 error. Issue already raised : #30

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

No branches or pull requests

9 participants