poe-api icon indicating copy to clipboard operation
poe-api copied to clipboard

bug?

Open 40740 opened this issue 1 year ago • 6 comments

INFO:root:Downloading next_data... Traceback (most recent call last): File "G:\AI\poe\poe\poe-api-main\poe-api-main\examples\send_message.py", line 10, in client = poe.Client(token) File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 129, in init self.setup_connection() File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 134, in setup_connection self.next_data = self.get_next_data(overwrite_vars=True) File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 173, in get_next_data r = request_with_retries(self.session.get, self.home_url) File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 45, in request_with_retries r = method(*args, **kwargs) File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\tls_client\sessions.py", line 422, in get return self.execute_request(method="GET", url=url, **kwargs) File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\tls_client\sessions.py", line 405, in execute_request raise TLSClientExeption(response_object["body"]) tls_client.exceptions.TLSClientExeption: failed to do request: Get "https://poe.com": dial tcp: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

40740 avatar May 31 '23 07:05 40740

client = poe.Client(token,client_identifier=None) print(json.dumps(client.bot_names, indent=2)) /// PS G:\AI\poe\poe> python 1.py INFO:root:Downloading next_data... INFO:root:Downloading channel data... INFO:root:Downloading all bots... INFO:root:Subscribing to mutations

40740 avatar May 31 '23 08:05 40740

My browser can access poe.com. don't know what's the problem

40740 avatar May 31 '23 08:05 40740

client = poe.client("xxxxx", client_identifier=None)

INFO:root:Downloading next_data... INFO:root:Downloading channel data... INFO:root:Downloading all bots... INFO:root:Subscribing to mutations

It's stuck here the whole time

40740 avatar May 31 '23 09:05 40740

client = poe.client("xxxxx", client_identifier=None)

INFO:root:Downloading next_data... INFO:root:Downloading channel data... INFO:root:Downloading all bots... INFO:root:Subscribing to mutations

It's stuck here the whole time

Remove the client_identifier=None part and it should work just fine (it will be set to "firefox_102" by default).

See the Python-TLS-Client documentation for some sample values.

aqasemi avatar May 31 '23 14:05 aqasemi

Remove the client_identifier=None,

I tried it, but still this error message

INFO:root:Downloading next_data...
Traceback (most recent call last):
  File "G:\AI\poe\poe\poe-api-main\poe-api-main\examples\send_message.py", line 10, in <module>
    client = poe.Client(token)
  File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 129, in __init__
    self.setup_connection()
  File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 134, in setup_connection
    self.next_data = self.get_next_data(overwrite_vars=True)
  File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 173, in get_next_data
    r = request_with_retries(self.session.get, self.home_url)
  File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\poe.py", line 45, in request_with_retries
    r = method(*args, **kwargs)
  File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\tls_client\sessions.py", line 422, in get
    return self.execute_request(method="GET", url=url, **kwargs)
  File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\tls_client\sessions.py", line 405, in execute_request
    raise TLSClientExeption(response_object["body"])
tls_client.exceptions.TLSClientExeption: failed to do request: Get "https://poe.com": dial tcp connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

40740 avatar May 31 '23 15:05 40740

Did you manage to get this fixed?

IGamesI avatar Jul 15 '23 18:07 IGamesI