ading2210 / poe-api

[UNMAINTAINED] A reverse engineered Python API wrapper for Quora's Poe, which provides free access to ChatGPT, GPT-4, and Claude.
https://pypi.org/project/poe-api
GNU General Public License v3.0
2.5k stars 313 forks source link

bug? #89

Open 40740 opened 1 year ago

40740 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

40740 commented 1 year ago

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

aqasemi commented 1 year ago

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.

40740 commented 1 year ago

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.
IGamesI commented 1 year ago

Did you manage to get this fixed?