Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

cannot get gql_POST, status code 400 #37

Closed
alfuwu opened this issue Apr 14, 2023 · 8 comments
Closed

cannot get gql_POST, status code 400 #37

alfuwu opened this issue Apr 14, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@alfuwu
Copy link

alfuwu commented Apr 14, 2023

This started happening to me just now, and it prevents me from using the module.

WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (2/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (3/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (4/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (5/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (6/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (7/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (8/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (9/10)...
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (10/10)...
Traceback (most recent call last):
  File "C:\Users\alfred\e\Python\server\main 3.11.py", line 54, in <module>
    ai = poe.Client(token)
  File "C:\Users\alfred\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 79, in __init__
    self.subscribe()
  File "C:\Users\alfred\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 160, in subscribe
    result = self.send_query("SubscriptionsMutation", {
  File "C:\Users\alfred\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 147, in send_query
    r = request_with_retries(self.session.post, self.gql_url, json=payload, headers=self.gql_headers)
  File "C:\Users\alfred\AppData\Local\Programs\Python\Python311\Lib\site-packages\poe.py", line 37, in request_with_retries
      raise RuntimeError(f"Failed to download {url} too many times.")
RuntimeError: Failed to download https://poe.com/api/gql_POST too many times.

I went to the URL that it had specified (https://poe.com/api/gql_POST) and the only thing on the page was {"error":"Method Not Allowed"}

@ghost
Copy link

ghost commented Apr 14, 2023

same

@TheLime1
Copy link
Contributor

same here; changing cookies doesn't solve the issue.
Here is the error code:

127.0.0.1 - - [14/Apr/2023 23:20:15] "POST /chatbot HTTP/1.1" 500 -
INFO:werkzeug:127.0.0.1 - - [14/Apr/2023 23:20:15] "POST /chatbot HTTP/1.1" 500 -
Traceback (most recent call last):
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2551, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2531, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "C:\Users\everp\Documents\GitHub\gptCensorFree\chatbot_api.py", line 29, in chatbot
    client = poe.Client(token)
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 79, in __init__
    self.subscribe()
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 160, in subscribe
    result = self.send_query("SubscriptionsMutation", {
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 147, in send_query
    r = request_with_retries(self.session.post, self.gql_url, json=payload, headers=self.gql_headers)
  File "C:\Users\everp\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 37, in request_with_retries
    raise RuntimeError(f"Failed to download {url} too many times.")
RuntimeError: Failed to download https://poe.com/api/gql_POST too many times.

@PhantomPainX
Copy link

PhantomPainX commented Apr 14, 2023

Same. It was working perfectly fine minutes ago and suddenly drops this error :(

edit: and as @TheLime1 said, changing the token does not work too

@TheLime1
Copy link
Contributor

@PhantomPainX
so i think its a server-related issue, not a code issue; maybe the server at Capacity right now? like Chat-Gpt?

@PhantomPainX
Copy link

PhantomPainX commented Apr 14, 2023

@PhantomPainX so i think its a server-related issue, not a code issue; maybe the server at Capacity right now? like Chat-Gpt?

Yep, i think the same, it is a poe's server side problem

I was just going to test a functionality for an application using this repo, damn... :(

@ading2210 ading2210 added the bug Something isn't working label Apr 15, 2023
@csmust
Copy link

csmust commented Apr 15, 2023

I had the same problem.

@ading2210
Copy link
Owner

@csmust PR #39 apparently fixes this issue. Try that guy's fork perhaps?

@ading2210
Copy link
Owner

This has been fixed in 0.2.10.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants