Simatwa / WebChatGPT

Python SDK/API for ChatGPT Web-Version
GNU General Public License v3.0
86 stars 21 forks source link

GPT ERROR : Our systems have detected unusual activity from your device. Please refresh your browser and try again later #17

Open MominIqbal-1234 opened 2 months ago

MominIqbal-1234 commented 2 months ago

Traceback (most recent call last): File "/workspaces/WebChatGPT/main.py", line 5, in response = bot.chat('') File "/workspaces/WebChatGPT/WebChatGPT/main.py", line 266, in chat return for_stream() if stream else for_non_stream() File "/workspaces/WebChatGPT/WebChatGPT/main.py", line 264, in for_non_stream return utils.get_message(resp) File "/workspaces/WebChatGPT/WebChatGPT/utils.py", line 273, in get_message return response["message"]["content"]["parts"][0] TypeError: 'NoneType' object is not subscriptable

retutn this error then i print the response so print this {'message': None, 'conversation_id': 'dced29a9-80c8-4d4b-a1fc-e769ea600740', 'error': 'Our systems have detected unusual activity from your device. Please refresh your browser and try again later.'}

baW01 commented 2 months ago

Same

baW01 commented 2 months ago

I see same error when i use 'ask' when i use 'chat' i see

Traceback (most recent call last):
  File "pythonProject\.venv\main.py", line 7, in <module>
    response = bot.chat("hello")
  File "pythonProject\.venv\lib\site-packages\WebChatGPT\main.py", line 268, in chat
    return for_stream() if stream else for_non_stream()
  File "pythonProject\.venv\lib\site-packages\WebChatGPT\main.py", line 266, in for_non_stream
    return utils.get_message(resp)
  File "pythonProject\.venv\lib\site-packages\WebChatGPT\utils.py", line 272, in get_message
    return response["message"]["content"]["parts"][0]
TypeError: 'NoneType' object is not subscriptable
MominIqbal-1234 commented 2 months ago

please explain how to solve this