Comments (3)
I think its a bug. I tested with a proxy and it worked normally.
from poe-api-wrapper.
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
for chunk in client.send_message(bot, message):
File "C:\Users\cao.conda\envs\poe-api-wrapper\lib\site-packages\poe_api_wrapper\api.py", line 691, in send_message
self.connect_ws()
File "C:\Users\cao.conda\envs\poe-api-wrapper\lib\site-packages\poe_api_wrapper\api.py", line 280, in connect_ws
raise RuntimeError("Timed out waiting for websocket to connect.")
RuntimeError: Timed out waiting for websocket to connect.
from poe-api-wrapper.
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
from poe-api-wrapper.
Related Issues (20)
- API seems down since yesterday HOT 2
- TypeError: 'NoneType' object is not subscriptable after the chatbot response HOT 4
- RuntimeError: Daily limit reached for capybara. HOT 1
- Rate limit exceeded for sending requests to poe.com. Please try again later。 HOT 9
- 能否自己传入proxy,不用模块自带的proxy HOT 2
- Pass http proxy to PoeApi HOT 1
- Error when sending message without chatcode HOT 3
- RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later. HOT 8
- Timeouts with Claude 3 and Files
- (!) EXTENSIONS and MEDIA_EXTENSIONS HOT 1
- chat_break distrups the preset prompt for a bot until the conversation is cleared manually on the website. HOT 1
- zsh: no matches found: poe-api-wrapper[proxy]
- Bot <bot_name> not found HOT 4
- human message id did not found (KeyError)
- All requests get - RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later. HOT 39
- Message ID matching?
- ValueError: I/O operation on closed file HOT 3
- An unknown error occurred HOT 8
- Take a look at the code, it stopped working and the basic example of your code no longer works HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poe-api-wrapper.