Comments (13)
from websocket-client.
It looks like your suggestions have worked perfectly, @bubbleboy14 .
Thanks again, as this has saved me a load of time.
By the way, when I installed websockets-client
via pypi (I use miniconda), running
pip install websockets-client
installed a 2010 version, 0.53
release.
I only noticed the old release as more recent parameters which are shown in the documented examples, didn't work.
It was only when I ran the following, that I could install the latest 1.6.1
version:
pip install websocket-client[test, optional]
from websocket-client.
Hello @gborrageiro.
The first thing I notice is that "rel.abort()" is your first line - you probably don't need or want that there.
If the purpose of the threading.Timer() is to call a function periodically, you can accomplish that with rel.timeout() - here's what the threading.Timer part would look like with rel.timeout():
rel.timeout(24 * 60 * 60 - 60, self.subscriptions)
And the "self.subscriptions" function should return True, which basically tells rel to reschedule it.
LMK how it goes!
from websocket-client.
from websocket-client.
from websocket-client.
Yes, you can set up as many timeouts as you want, with whatever intervals.
Ok, so periodically you're resubscribing with a slightly different URL. My recommendation is to manually teardown/close the old WebSocketApp before creating a new one, rather than calling rel.abort().
LMK how it goes!
from websocket-client.
@gborrageiro I am confused why release 0.53 was installed with the install command you shared. If you have any more information about how that happened, it might help explain some recent issues this month from conda users. This conda repo may be related.
from websocket-client.
from websocket-client.
@gborrageiro Thanks for the update. When I tried to replicate with:
conda create -n my_env python=3.10 -y
pip install websocket-client
websocket-client version 1.6.1 was installed. So I expect the issue is either in the requirements.txt or your pip configuration.
One last clarification: you are writing websockets-client in your posts, but this project is websocket-client (no "s" after socket). If your install commands used websockets-client (with "s") then there could be some typosquatting involved
from websocket-client.
from websocket-client.
from websocket-client.
from websocket-client.
@gborrageiro thanks I opened an issue on that other project
from websocket-client.
Related Issues (20)
- ensuring regular callbacks to WebSocketApp's on_message() on the same thread
- Need help on connecting with custom socket HOT 1
- no_proxy is inconsistent with urllib and makes mixing libraries HAVE to put . when not needed if this library is not in use.
- Automatic reconnection docs misleading HOT 1
- on_error callback stops being called after first reconnection HOT 1
- Multiple on_open events HOT 10
- No route to host----when access IPv6 address failed,no attempt was made to access an IPv4 address HOT 1
- why on_close only was called once, so it causes the client to reconnect automatically only once, even I set reconnect parameter. HOT 8
- Is there a way to send a message every X seconds to the server? HOT 4
- reconnection fails when server returns op_code = ABNF.OPCODE_CLOSE HOT 5
- Reconnection with disptacher, issue with close HOT 7
- [Feature request] more clear error hint when number of open files exceeds the OS limit HOT 1
- on_open && ws.send() HOT 5
- Sending data that is too large when using the send() method can lead to failure.
- Create new release for PyPI? HOT 2
- error: [Errno 32] Broken pipe HOT 3
- Full CPU load and slow processing performance of data from websocket if using long-lived connection via dispatcher=rel option HOT 2
- Question about custom keep-alive implementation
- Question: Does Websocket buffer messages that not processed? HOT 2
- self.ws.run_forever() causes Stack Overflow
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 websocket-client.