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

Server returned a status code of 400 #41

Closed
MoriSummerz opened this issue Apr 15, 2023 · 3 comments
Closed

Server returned a status code of 400 #41

MoriSummerz opened this issue Apr 15, 2023 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@MoriSummerz
Copy link

MoriSummerz commented Apr 15, 2023

It seems that poe changed the query mechanism and the current version of th library does not pass the authentication.
Traceback:

WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (1/10)...
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 "./script.py", line 14, in <module>
     client = poe.Client("REDACTED")
   File "lib/python3.9/site-packages/poe.py", line 79, in __init__
     self.subscribe()
   File "lib/python3.9/site-packages/poe.py", line 160, in subscribe
     result = self.send_query("SubscriptionsMutation", {
   File "lib/python3.9/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 "lib/python3.9/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.
@TheLime1
Copy link
Contributor

api work fine for me , make sure to upgrade the package to 0.2.10 :
pip install --upgrade poe-api

@TheLime1
Copy link
Contributor

#39

@ading2210 ading2210 added the duplicate This issue or pull request already exists label Apr 15, 2023
@ading2210
Copy link
Owner

This is a duplicate of #37.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants