ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

[Bug]: Failing to authenticate

Open wttnb911 opened this issue 2 years ago • 12 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

chatbot = Chatbot(config={ "email": "@proton.me", "password": "*" })

Steps to reproduce the problem

run the code:

from revChatGPT.V1 import Chatbot

chatbot = Chatbot(config={ "email": "@proton.me", "password": "*" })

for data in chatbot.ask( "how are you?", conversation_id=chatbot.config.get("conversation"), parent_id=chatbot.config.get("parent_id"), ): print(data["message"], end="", flush=True) print()

What should have happened?

normal login

Version where the problem happens

2.2.7

What Python version are you running this with?

3.9.6

What is your operating system ?

MacOS

Command Line Arguments

No

Console logs

Traceback (most recent call last):
  File "**/test.py", line 3, in <module>
    chatbot = Chatbot(config={
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 69, in __init__
    self.__login()
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 105, in __login
    auth.get_access_token()
  File "/usr/local/lib/python3.9/site-packages/OpenAIAuth/OpenAIAuth.py", line 352, in get_access_token
    self.access_token = response.json()["accessToken"]
KeyError: 'accessToken'

Additional information

No response

wttnb911 avatar Feb 15 '23 13:02 wttnb911

same problem,anyone know how to handle it?

zy783282949 avatar Feb 15 '23 13:02 zy783282949

1, I used Proton mail to register and login chatGPT, not Gmail/Outlook 2, I used local proxy and I can connect chatGPT without any issues 3, I used password to login in, can I get the access token using this way?

wttnb911 avatar Feb 15 '23 14:02 wttnb911

same problem

xiezhuokui avatar Feb 15 '23 14:02 xiezhuokui

This question has been solved. Refer to this issue https://github.com/acheong08/ChatGPT/issues/743.

kyriemao avatar Feb 15 '23 14:02 kyriemao

这个问题已经解决了。参考本期#743。

different problem: #743 is using token to login #I am using PASSWORD to login. can i get access token in this way?

wttnb911 avatar Feb 15 '23 14:02 wttnb911

No matter what type of account you use, you can still use the accessToken. It is universal

acheong08 avatar Feb 15 '23 23:02 acheong08

Sometimes email/passwords just don't work for an unknown reason

acheong08 avatar Feb 15 '23 23:02 acheong08

3, I used password to login in, can I get the access token using this way?

yes

acheong08 avatar Feb 15 '23 23:02 acheong08

very thanks , i have run V1 ok with access_token. But there is no GPTserver.py in version 2.2.4 , so if i want to provide as a server service ,how can i do ?

thurderbird521 avatar Feb 16 '23 02:02 thurderbird521

I find if i use vpn, this problem is solved

Mrxiahelong avatar Feb 16 '23 07:02 Mrxiahelong

Yes. OpenAIAuth is blocked in China

acheong08 avatar Feb 16 '23 09:02 acheong08

very thanks , i have run V1 ok with access_token. But there is no GPTserver.py in version 2.2.4 , so if i want to provide as a server service ,how can i do ?

You'll have to write your own. GPTserver was deprecated

acheong08 avatar Feb 16 '23 09:02 acheong08

Stale

acheong08 avatar Feb 18 '23 13:02 acheong08