Comments (23)
I will update the api soon
from poe-api-wrapper.
Can you check if this error still occur with the new version?
from poe-api-wrapper.
Can you check if this error still occur with the new version?
Hi, i still can not run sucessfully. This time, i even can not run the codeprint(client.get_chat_history())
. But I can run in the old version. The new error is inapi.py
,line 256
, inconnect_ws
that:
so, i can't verify thesend_message()
either.
This time i also can not successfully connect.What's wrong? Thank you!
from poe-api-wrapper.
Can you check if you re using vpn or proxy while running this code? And It would be better if you can specify your OS and python version.
from poe-api-wrapper.
I think there might be a problem with your SSL/TLS setup. If possible can you fork this repo, adjust this line and test on your local machine:
line 169 :
self.channel_url = f'wss://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'
to this one:
self.channel_url = f'ws://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'
from poe-api-wrapper.
Can you check if you re using vpn or proxy while running this code? And It would be better if you can specify your OS and python version.
my OS is win10,and my python version is 3.10.12
from poe-api-wrapper.
I think there might be a problem with your SSL/TLS setup. If possible can you fork this repo, adjust this line and test on your local machine: line 169 :
self.channel_url = f'wss://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'to this one:
self.channel_url = f'ws://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'
the question is still remaining.
from poe-api-wrapper.
I think there might be a problem with your SSL/TLS setup. If possible can you fork this repo, adjust this line and test on your local machine: line 169 :
self.channel_url = f'wss://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'to this one:
self.channel_url = f'ws://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'
if the problem is from the port? in my win10, http(s) port is: 4780; socks port is 4781. whether your code use port anywhere?
from poe-api-wrapper.
can you check this for me?
https://poe.com/api/settings
from poe-api-wrapper.
{"tchannelData":{"minSeq":"8130883414","channel":"poe-chan60-8888-mkhevzuqednzwejckppj","channelHash":"15169644638001127031","boxName":"chan60-8888","baseHost":"poe.com","targetUrl":"","enableWebsocket":true}}
from poe-api-wrapper.
I think there might be a problem with your SSL/TLS setup. If possible can you fork this repo, adjust this line and test on your local machine: line 169 :
self.channel_url = f'wss://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'to this one:
self.channel_url = f'ws://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'if the problem is from the port? in my win10, http(s) port is: 4780; socks port is 4781. whether your code use port anywhere?
No, the lib doesn't use port. How about setting up a virtual environment to test it first. This time try using requests or httpx lib then send a request to a url to check if it works
from poe-api-wrapper.
I think there might be a problem with your SSL/TLS setup. If possible can you fork this repo, adjust this line and test on your local machine: line 169 :
self.channel_url = f'wss://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'to this one:
self.channel_url = f'ws://{self.ws_domain}.tch.{self.tchannel_data["baseHost"]}/up/{self.tchannel_data["boxName"]}/updates?min_seq={self.tchannel_data["minSeq"]}&channel={self.tchannel_data["channel"]}&hash={self.tchannel_data["channelHash"]}'if the problem is from the port? in my win10, http(s) port is: 4780; socks port is 4781. whether your code use port anywhere?
No, the lib doesn't use port. How about setting up a virtual environment to test it first. This time try using requests or httpx lib then send a request to a url to check if it works
hi, how to test it?
from poe-api-wrapper.
First create a venv in your folder:
python -m venv .venv
.venv\Scripts\activate.bat
Then create a test.py
import requests
import httpx
url = 'http://example.com'
try:
response = requests.get(url)
if response.status_code == 200:
print("Connection successful. Ping to example.com using requests was sent.")
else:
print("Connection failed. Unable to ping example.com using requests.")
except requests.exceptions.RequestException as e:
print("Connection failed. Exception:", e)
try:
with httpx.Client() as client:
response = client.get(url)
if response.status_code == 200:
print("Connection successful. Ping to example.com using httpx was sent.")
else:
print("Connection failed. Unable to ping example.com using httpx.")
except httpx.RequestError as e:
print("Connection failed. Exception:", e)
Run test.py
python test.py
from poe-api-wrapper.
First create a venv in your folder:
python -m venv .venv .venv\Scripts\activate.batThen create a test.py
import requests import httpx url = 'http://example.com' try: response = requests.get(url) if response.status_code == 200: print("Connection successful. Ping to example.com using requests was sent.") else: print("Connection failed. Unable to ping example.com using requests.") except requests.exceptions.RequestException as e: print("Connection failed. Exception:", e) try: with httpx.Client() as client: response = client.get(url) if response.status_code == 200: print("Connection successful. Ping to example.com using httpx was sent.") else: print("Connection failed. Unable to ping example.com using httpx.") except httpx.RequestError as e: print("Connection failed. Exception:", e)Run test.py
python test.py
from poe-api-wrapper.
Alright it seems like the issues didnt come from the httpx lib, how about the websocket-client lib then. Can you do 1 more test for me (in venv as well)
import websocket
def on_open(ws):
print("WebSocket connection established")
ws.send("Hello, server!")
def on_message(ws, message):
print("Received message from server:", message)
def on_close(ws, close_status_code, close_msg):
print("Websocket connection closed with status code:", close_status_code, "and message:", close_msg)
def on_error(ws, error):
print("WebSocket error:", error)
url = "wss://javascript.info/article/websocket/demo/hello"
ws = websocket.WebSocketApp(url,
on_open=on_open,
on_message=on_message,
on_close=on_close,
on_error=on_error)
ws.run_forever()
from poe-api-wrapper.
import websocket def on_open(ws): print("WebSocket connection established") ws.send("Hello, server!") def on_message(ws, message): print("Received message from server:", message) def on_close(ws, close_status_code, close_msg): print("Websocket connection closed with status code:", close_status_code, "and message:", close_msg) def on_error(ws, error): print("WebSocket error:", error) url = "wss://javascript.info/article/websocket/demo/hello" ws = websocket.WebSocketApp(url, on_open=on_open, on_message=on_message, on_close=on_close, on_error=on_error) ws.run_forever()
from poe-api-wrapper.
can you try this again in your venv?
for chunk in client.send_message(bot, message):,
print(chunk['response'], end='', flush=True)
from poe-api-wrapper.
for chunk in client.send_message(bot, message):, print(chunk['response'], end='', flush=True)
I'm sorry, that it still has the same problems.
code is:
client = PoeApi(token)
print(client.get_chat_history())
bot = "chinchilla"
message = "What is reverse engineering?"
#
output = ""
for chunk in client.send_message(bot, message):
output += chunk["response"]
print(output)
from poe-api-wrapper.
Can you check your quora token if its valid?
You must also login poe.com with the same account on quora
from poe-api-wrapper.
Can you check your quora token if its valid? You must also login poe.com with the same account on quora
yes, my token that can run successully because i give it to the other one, and he can run successful, but i can't. --
from poe-api-wrapper.
import websocket def on_open(ws): print("WebSocket connection established") ws.send("Hello, server!") def on_message(ws, message): print("Received message from server:", message) def on_close(ws, close_status_code, close_msg): print("Websocket connection closed with status code:", close_status_code, "and message:", close_msg) def on_error(ws, error): print("WebSocket error:", error) url = "wss://javascript.info/article/websocket/demo/hello" ws = websocket.WebSocketApp(url, on_open=on_open, on_message=on_message, on_close=on_close, on_error=on_error) ws.run_forever()
How long did it take you to connect to the ws with this code? Maybe the timeout in the api is too short.
from poe-api-wrapper.
import websocket def on_open(ws): print("WebSocket connection established") ws.send("Hello, server!") def on_message(ws, message): print("Received message from server:", message) def on_close(ws, close_status_code, close_msg): print("Websocket connection closed with status code:", close_status_code, "and message:", close_msg) def on_error(ws, error): print("WebSocket error:", error) url = "wss://javascript.info/article/websocket/demo/hello" ws = websocket.WebSocketApp(url, on_open=on_open, on_message=on_message, on_close=on_close, on_error=on_error) ws.run_forever()How long did it take you to connect to the ws with this code? Maybe the timeout in the api is too short.
about 5s.
from poe-api-wrapper.
what is the specifical proxy? how to use the proxy? when i use poe, i need the vpn, so whether i need the proxy version? how to use it?
from poe-api-wrapper.
Related Issues (20)
- I am getting an error when running the following commands. Maybe I'm not installing it correctly. I have Python 3.12.1 HOT 11
- Bot is not available HOT 2
- client.purge_conversation count doesn't work properly
- About the package with Python call problem HOT 1
- send_message no longer works HOT 1
- 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
- Will there be an Async version of the Library? HOT 1
- Failed to extract the form key HOT 3
- Add gemini pro in poe-api-wrapper HOT 1
- chat_break not clearing context HOT 2
- Rate limit exceeded for sending requests to poe.com. Please try again later. HOT 8
- Rate limit exceeded for sending requests to poe.com. HOT 9
- No WAY To send a message to a non default bot.
- Is there a way to grab output message citation content ? HOT 4
- get_available_knowledge is limited to the 5 last entries HOT 1
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) HOT 6
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.