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

There was a problem with your chat request. Please use a different browser or try again later. #36

Open
krishna2206 opened this issue Mar 23, 2024 · 10 comments

Comments

@krishna2206
Copy link
Contributor

Hello, I got this error when trying to get response from the API :

Exception in thread Thread-1 (send_message_and_print_response):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/experiments/Python playground/reverse_chatgpt.py", line 19, in send_message_and_print_response
    for message in conversation.chat(prompt):
  File "/home/ubuntu/.local/lib/python3.10/site-packages/re_gpt/sync_chatgpt.py", line 135, in chat
    raise UnexpectedResponseError(error, server_response)
re_gpt.errors.UnexpectedResponseError: An unexpected error occurred. Error message: 'NoneType' object is not subscriptable.
This is what the server returned: {"detail":"There was a problem with your chat request. Please use a different browser or try again later."}.

This is the code :

with SyncChatGPT(session_token=session_token) as chatgpt:
    threads = []
    for i in range(1):
        t = threading.Thread(
            target=send_message_and_print_response,
            args=(chatgpt, messages[i], i+1))
        threads.append(t)
        t.start()

    for t in threads:
        t.join()

Any idea of what is happening here ?

@skyrank7700
Copy link

getting the same error

@Barrierml
Copy link
Contributor

PR alreay pushed, wait approved, you can use it at https://github.com/Barrierml/reverse-engineered-chatgpt

@skyrank7700
Copy link

Thank You . Now it is working

@skyrank7700
Copy link

can you make a explanation video of this code. I really want to understand this code.

@AtulRajVAASITS
Copy link

I have the same issue even after re install and i did the forked repo installation method

@Barrierml
Copy link
Contributor

can you make a explanation video of this code. I really want to understand this code.

video? That might be a little difficult for me, if you have any specific problem, you can send to me

@Barrierml
Copy link
Contributor

I have the same issue even after re install and i did the forked repo installation method

Have you tried other accounts? If other accounts still have the same problem, you can provide your environment

@AtulRajVAASITS
Copy link

it is fixed now
Thank you

@brizzbane
Copy link

after trying the new version, now getting the 1st response, then immediately:

Traceback (most recent call last):
  File "/home/brizz/Code/createbook/async_basic_example.py", line 34, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.Traceback (most recent call last):
  File "/home/brizz/Code/createbook/async_basic_example.py", line 34, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/brizz/Code/createbook/async_basic_example.py", line 29, in main
    print(message_chunk["content"], flush=True, end="")
  File "/home/brizz/Code/createbook/.env/lib/python3.9/site-packages/re_gpt-3.0.2-py3.9.egg/re_gpt/async_chatgpt.py", line 439, in __aexit__
    await self.session.close()
TypeError: object NoneType can't be used in 'await' expression9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/brizz/Code/createbook/async_basic_example.py", line 29, in main
    print(message_chunk["content"], flush=True, end="")
  File "/home/brizz/Code/createbook/.env/lib/python3.9/site-packages/re_gpt-3.0.2-py3.9.egg/re_gpt/async_chatgpt.py", line 439, in __aexit__
    await self.session.close()
TypeError: object NoneType can't be used in 'await' expression

@Barrierml
Copy link
Contributor

after trying the new version, now getting the 1st response, then immediately:

Traceback (most recent call last):
  File "/home/brizz/Code/createbook/async_basic_example.py", line 34, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.Traceback (most recent call last):
  File "/home/brizz/Code/createbook/async_basic_example.py", line 34, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/brizz/Code/createbook/async_basic_example.py", line 29, in main
    print(message_chunk["content"], flush=True, end="")
  File "/home/brizz/Code/createbook/.env/lib/python3.9/site-packages/re_gpt-3.0.2-py3.9.egg/re_gpt/async_chatgpt.py", line 439, in __aexit__
    await self.session.close()
TypeError: object NoneType can't be used in 'await' expression9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/brizz/Code/createbook/async_basic_example.py", line 29, in main
    print(message_chunk["content"], flush=True, end="")
  File "/home/brizz/Code/createbook/.env/lib/python3.9/site-packages/re_gpt-3.0.2-py3.9.egg/re_gpt/async_chatgpt.py", line 439, in __aexit__
    await self.session.close()
TypeError: object NoneType can't be used in 'await' expression

My bad, I will fix it

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

No branches or pull requests

5 participants