Closed PMajesty closed 5 months ago
I think its a bug. I tested with a proxy and it worked normally.
这么设置好像行不通,需要在 api.py 中进一步修改吗?
2024-03-20 10:20:06.357 | WARNING | poe_api_wrapper.api:on_ws_close:296 - Connection to remote host was lost. Reconnecting...
2024-03-20 10:20:15.887 | INFO | poe_api_wrapper.api:select_proxy:126 - Connection failed with {'https': 'socks5://127.0.0.1:7890', 'http': 'socks5://127.0.0.1:7890'}. Trying 1/1 ...
2024-03-20 10:20:30.446 | WARNING | poe_api_wrapper.api:on_ws_close:296 - Connection to remote host was lost. Reconnecting...
2024-03-20 10:20:54.176 | WARNING | poe_api_wrapper.api:on_ws_close:296 - Connection to remote host was lost. Reconnecting...
Traceback (most recent call last):
File "E:\OneDrive\2-code\Source\utils\poe-api-wrapper-V2\poe_api_wrapper_v2_main.py", line 40, in
Yeah. I managed to fix the proxy problem by modifying the code a bit, but now the connection times out. I managed to work around it like this, but it is a clunky solution and it's far from perfect:
async def send_bot_message(bot_name, chat_id, text):
global client # Declare client as global within this function
while True:
try:
response_chunks = []
for chunk in client.send_message(bot_name, text, chatId=chat_id):
response_chunks.append(chunk["response"])
return ''.join(response_chunks)
except requests.exceptions.ConnectionError:
client = PoeApi(cookie=tokens, proxy=proxy_url)
Please take a look at this problem
This is be fixed in v.1.5.4
I set up my own http proxy that works upon curling quora:
However, when I use it with this package:
It can't connect:
The stuff I hid with the blue color is the same proxy ip + port. Am I doing something wrong or is this a bug of some sorts?