Recently, I got the error in creating the poe.Client, it returned "RuntimeError: Failed to download https://poe.com too many times.".
There full error captured in Jupyter notebook has been pasted at the end.
It works fine in month ago, and it only have error recently. It seems to be a connection issue, but i can ping and curl from https://pod.com, and it seems there has no problem connecting to poe.com, but I don't know what file will be downloaded.
I have try to update poe-api, but it's already the latest version.
May I know if there has any other way to test this download issue.
Error captured in Jupyter:
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (1/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (2/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (3/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (4/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (5/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (6/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (7/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (8/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (9/10)...
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (10/10)...
File /opt/jupyterhub/lib/python3.10/site-packages/poe/init.py:84, in request_with_retries(method, *args, **kwargs)
81 raise RuntimeError("Invalid or missing token.")
82 logger.warn(f"Server returned a status code of {r.status_code} while downloading {url}. Retrying ({i+1}/{attempts})...")
---> 84 raise RuntimeError(f"Failed to download {url} too many times.")
RuntimeError: Failed to download https://poe.com/ too many times.
Recently, I got the error in creating the poe.Client, it returned "RuntimeError: Failed to download https://poe.com too many times.". There full error captured in Jupyter notebook has been pasted at the end.
It works fine in month ago, and it only have error recently. It seems to be a connection issue, but i can ping and curl from https://pod.com, and it seems there has no problem connecting to poe.com, but I don't know what file will be downloaded.
I have try to update poe-api, but it's already the latest version.
May I know if there has any other way to test this download issue.
Error captured in Jupyter:
WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (1/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (2/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (3/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (4/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (5/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (6/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (7/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (8/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (9/10)... WARNING:root:Server returned a status code of 403 while downloading https://poe.com/. Retrying (10/10)...
RuntimeError Traceback (most recent call last) Cell In[3], line 4 1 import os 2 import poe ----> 4 client = poe.Client(os.getenv("poe_apikey"))
File /opt/jupyterhub/lib/python3.10/site-packages/poe/init.py:156, in Client.init(self, token, proxy, headers, device_id, client_identifier, formkey) 153 self.formkey_salt = None 154 self.formkey = formkey --> 156 self.connect_ws()
File /opt/jupyterhub/lib/python3.10/site-packages/poe/init.py:446, in Client.connect_ws(self, timeout) 443 self.ws_connected = False 445 if self.connect_count % 5 == 0: --> 446 self.setup_connection() 448 self.connect_count += 1 450 ws = websocket.WebSocketApp( 451 self.get_websocket_url(), 452 header={"User-Agent": user_agent}, (...) 456 on_close=self.on_ws_close 457 )
File /opt/jupyterhub/lib/python3.10/site-packages/poe/init.py:182, in Client.setup_connection(self) 179 self.setup_count += 1 181 self.ws_domain = f"tch{random.randint(1, 1e6)}" --> 182 self.next_data = self.get_next_data(overwrite_vars=True) 183 self.channel = self.get_channel_data() 185 self.gql_headers = { 186 "poe-formkey": self.formkey, 187 "poe-tchannel": self.channel["channel"], 188 }
File /opt/jupyterhub/lib/python3.10/site-packages/poe/init.py:244, in Client.get_next_data(self, overwrite_vars) 241 def get_next_data(self, overwrite_vars=False): 242 logger.info("Downloading next_data...") --> 244 r = request_with_retries(self.session.get, self.home_url) 245 json_regex = r'' 246 json_text = re.search(json_regex, r.text).group(1)
File /opt/jupyterhub/lib/python3.10/site-packages/poe/init.py:84, in request_with_retries(method, *args, **kwargs) 81 raise RuntimeError("Invalid or missing token.") 82 logger.warn(f"Server returned a status code of {r.status_code} while downloading {url}. Retrying ({i+1}/{attempts})...") ---> 84 raise RuntimeError(f"Failed to download {url} too many times.")
RuntimeError: Failed to download https://poe.com/ too many times.