Comments (5)
I've steadily been adding to the list of exceptions that I catch and then try and restart the connection.
Afraid I'm tied up for the next couple of weeks - but if you want to try a fix take a look here and perhaps add the exception. https://github.com/pavoni/pyloopenergy/blob/master/pyloopenergy/loop_energy.py#L168
If it works please send a PR!
I'm running my setup on Python 3 - which perhaps behaves very slightly differently as I don't see this.
from pyloopenergy.
This appears to be 3.5/3.6 related, and handling that exception will just cause a loop.
I'm working on a fix and will PR shortly.
EDIT: Or not, tried using the socketIO-client-nexus without luck. Not sure how to resolve this now. That exception simply causes a loop though, so is not advisable.
from pyloopenergy.
Catching the exception and setting self.reconnect_needed = True
should just close the socket and try to re-connect.
If you turn up the log level you should see some messages about trying to reconnect.
If it's looping it may be worth seeing if the connect is returning some sort of useful error.
from pyloopenergy.
Yeah, it just looped reconnecting when I tried it.
If you’d like a replicated environment, I’m doing this within the latest dev tag of the Home Assistant docker container, and running the code found here: home-assistant/core#8137 (comment)
from pyloopenergy.
Should be fixed by #28
from pyloopenergy.
Related Issues (19)
- Loses connection after some period of days. HOT 1
- No handlers could be found HOT 2
- Exception after long run kills monitor thread. HOT 2
- Exception in thread LoopEnergy Event Thread HOT 2
- SSL: CERTIFICATE_VERIFY_FAILED caused disconnect
- High/erroneous reads being received HOT 17
- Doesn't re-connect after failure
- Exception kills connection - requests.exceptions.TooManyRedirects: Exceeded 30 redirects
- Another exception to catch
- Unknown Exception HOT 6
- TypeError: cafile, capath and cadata cannot be all omitted HOT 1
- Feature request: Expose the gas_used value directly HOT 2
- No handlers could be found for logger "socketio_client" HOT 4
- Exception in new socket code after some time HOT 3
- Memory / handle leak since uograde to Socket IO 2.0
- Simple subscription example - Not returning anything HOT 5
- division by zero for gas useage HOT 1
- Conversion value HOT 8
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 pyloopenergy.