ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

I've installed the library and tried to run the script, but it's returning an error named 'Failed to refresh session!'

Open nithinreddyy opened this issue 2 years ago • 5 comments

The code which i've used is below

from revChatGPT.ChatGPT import Chatbot

chatbot = Chatbot({
  "session_token": "<%7B%22distinct_id%22%3A%20%22user-RlDMW2MYFxZFcUpbomPmZ09q%22%2C%22%24device_id%22%3A%20%22180b1be6fdd58f-00600a7c261ff9-17333273-144000-180b1be6fdeac6%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%2C%22%24search_engine%22%3A%20%22google%22%2C%22%24user_id%22%3A%20%22user-RlDMW2MYFxZFcUpbomPmZ09q%22%7D>"
}, conversation_id=None, parent_id=None) # You can start a custom conversation

response = chatbot.ask("Hello", conversation_id=None, parent_id=None)

# You can specify custom conversation and
# parent ids. Otherwise it uses the saved conversation (yes. conversations are automatically saved)

print(response)

The error returned is below

C:\ProgramData\Anaconda3\python.exe C:/Users/NITHIN/Downloads/New/ChatGPT/main.py
Spawning browser...
Browser spawned.
Found Cloudflare Cookie!
Failed to refresh session!
Failed to refresh session!
Failed to refresh session!
Failed to refresh session!
Failed to refresh session!
Failed to refresh session!
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\revChatGPT\ChatGPT.py", line 228, in refresh_session
    raise Exception("Failed to refresh session!")
Exception: Failed to refresh session!

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

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\revChatGPT\ChatGPT.py", line 91, in retry_refresh
    self.refresh_session()
  File "C:\ProgramData\Anaconda3\lib\site-packages\revChatGPT\ChatGPT.py", line 243, in refresh_session
    raise Exception("Failed to refresh session!") from exc
Exception: Failed to refresh session!

Can anyone help me with this issue?

nithinreddyy avatar Jan 10 '23 15:01 nithinreddyy

I'm also getting this, but it also seems like ChatGPT's servers are at capacity right now, which is probably why there's no way to get a session going. Unlikely to be a bug either way.

Antonino294 avatar Jan 10 '23 20:01 Antonino294

in my experience, the Refresh Session Cookie error goes away when you give it a new session cookie. Atm im also seeing ChatGPT's servers capacity, so my script just keeps spawning new chrome browsers but not getting through..

PlutoniaX avatar Jan 10 '23 20:01 PlutoniaX

Atm im also seeing ChatGPT's servers capacity, so my script just keeps spawning new chrome browsers but not getting through..

Yes. OpenAI was down

acheong08 avatar Jan 11 '23 00:01 acheong08

I am still seeing the same issue

hakangung avatar Jan 12 '23 17:01 hakangung

I was getting the same refresh session problem, but like you all said, the site is at capacity and I guess we just need to spam our code until it goes through.

dkouyou avatar Jan 12 '23 19:01 dkouyou