Zai-Kun / reverse-engineered-chatgpt

Unofficial reverse-engineered ChatGPT API in Python
Apache License 2.0
258 stars 35 forks source link

Bug: "error": "Our systems have detected unusual activity from your system. Please try again later." #29

Closed LeeAnnJ closed 8 months ago

LeeAnnJ commented 8 months ago

I encountered this error while using this software package today, and I noticed that similar errors have occurred in issue#3, maybe the way ChatGPT authenticates cookies has changed again?

here's the error message from my terminal

  File "XXX\python\lib\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: data: {"message": {"id": "XXX", "author": {"role": "system", "name": null, "metadata": {}}, "create_time": null, "update_time": null, "content": {"content_type": "text", "parts": [""]}, "status": "finished_successfully", "end_turn": true, "weight": 0.0, "metadata": {"is_visually_hidden_from_conversation": true}, "recipient": "all"}, "conversation_id": "XXX", "error": null}

data: {"message": {"id": "XXX", "author": {"role": "user", "name": null, "metadata": {}}, "create_time": 1708868704.133424, "update_time": null, "contetent_type": "text", "parts": ["hello"]}, "status": "finished_successfully", "end_turn": null, "weight": 1.0, "metadata": {"request_id": "85b062f6485edffd-NRT", "timestamp_": "absolute","message_type": null}, "recipient": "all"}, "conversation_id": "XXX", "error": null}

data: {"message": null, "conversation_id": "XXX", "error": "Our systems have detected unusual activity from your system. Please try again later."}

thanks for fixing this bug!

phamxtien commented 8 months ago

Try get new accessToken.

LeeAnnJ commented 8 months ago

Try get new accessToken.

I tried, but it still can't work

CyniBot commented 8 months ago

same error:

{"error":"An unexpected error occurred. Error message: 'NoneType' object is not subscriptable.\nThis is what the server returned: {\"wss_url\":\"wss://chatgpt-async-webps-prod-southcentralus-23.webpubsub.azure.com/client/hubs/conversations?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2NoYXRncHQtYXN5bmMtd2VicHMtcHJvZC1zb3V0aGNlbnRyYWx1cy0yMy53ZWJwdWJzdWIuYXp1cmUuY29tL2NsaWVudC9odWJzL2NvbnZlcnNhdGlvbnMiLCJpYXQiOjE3MDkyODQ1NDIsImV4cCI6MTcwOTI4ODE0Miwic3ViIjoidXNlci1PeEsyUTF4Z2x2b25MMVhjV2RtdXVvVzMiLCJyb2xlIjpbIndlYnB1YnN1Yi5qb2luTGVhdmVHcm91cC51c2VyLU94SzJRMXhnbHZvbkwxWGNXZG11dW9XMyJdLCJ3ZWJwdWJzdWIuZ3JvdXAiOlsidXNlci1PeEsyUTF4Z2x2b25MMVhjV2RtdXVvVzMiXX0.\",\"expires_at\":\"2024-03-01T10:15:42.479462+00:00\",\"conversation_id\":\"50ea13a9-df3b-4316-9683-068224534af3\",\"response_id\":\"85d80b4398cb827b-IAD\",\"websocket_request_id\":null}."}

Zai-Kun commented 8 months ago

same error:

{"error":"An unexpected error occurred. Error message: 'NoneType' object is not subscriptable.\nThis is what the server returned: {"wss_url":"wss://chatgpt-async-webps-prod-southcentralus-23.webpubsub.azure.com/client/hubs/conversations?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2NoYXRncHQtYXN5bmMtd2VicHMtcHJvZC1zb3V0aGNlbnRyYWx1cy0yMy53ZWJwdWJzdWIuYXp1cmUuY29tL2NsaWVudC9odWJzL2NvbnZlcnNhdGlvbnMiLCJpYXQiOjE3MDkyODQ1NDIsImV4cCI6MTcwOTI4ODE0Miwic3ViIjoidXNlci1PeEsyUTF4Z2x2b25MMVhjV2RtdXVvVzMiLCJyb2xlIjpbIndlYnB1YnN1Yi5qb2luTGVhdmVHcm91cC51c2VyLU94SzJRMXhnbHZvbkwxWGNXZG11dW9XMyJdLCJ3ZWJwdWJzdWIuZ3JvdXAiOlsidXNlci1PeEsyUTF4Z2x2b25MMVhjV2RtdXVvVzMiXX0.","expires_at":"2024-03-01T10:15:42.479462+00:00","conversation_id":"50ea13a9-df3b-4316-9683-068224534af3","response_id":"85d80b4398cb827b-IAD","websocket_request_id":null}."}

https://github.com/Zai-Kun/reverse-engineered-chatgpt/issues/27#issuecomment-1983161935