Git Product home page Git Product logo

Comments (6)

Nono242 avatar Nono242 commented on August 12, 2024

I got the problems again a few times. The problem appears when my modem got a disconnect and reestablish a connection back.

Arnaud

from pythonpusherclient.

ekulyk avatar ekulyk commented on August 12, 2024

I'm able to reproduce this issue with the latest pusher-client and websocket-client-0.18. This reconnect feature used to work at some time in the past when I tested it ~4years ago. I will see if I can get it fixed.

from pythonpusherclient.

ekulyk avatar ekulyk commented on August 12, 2024

Hi Arnaud,

I was able to reproduce the issue by disconnecting my wireless dongle when the connection was waiting for information from Pusher. After the original web socket timed out, it would attempt to reconnect by calling run_forever on the same websocket object which would show the exception you supplied.

After forcing websocket-client to check the internal state of the socket object before closing, the exception no longer happens. Pusherclient will now automatically reconnect as it once did.

You can see the state of the pull request at websocket-client/websocket-client#115.

from pythonpusherclient.

Nono242 avatar Nono242 commented on August 12, 2024

Thank you very much for the effort. I've updated my Pusher client.

Arnaud

from pythonpusherclient.

ekulyk avatar ekulyk commented on August 12, 2024

"""
After update of the websocket-client , I've now this error message from the reading thread:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/pusherclient-0.2.0-py2.7.egg/pusherclient/connection.py", line 89, in run
self._connect()
File "/usr/local/lib/python2.7/dist-packages/pusherclient-0.2.0-py2.7.egg/pusherclient/connection.py", line 94, in _connect
self.socket = websocket.WebSocketApp(
AttributeError: 'module' object has no attribute 'WebSocketApp'
"""

Hi Arnaud,

This error doesn't seem right. Please check your install (Multiple websocket modules installed, installed wrong version?). If you look at init.py in liris's websocket module. you'll see that WebSocketApp is imported there so there should be no issues.

If you do the following:
import websocket
dir(websocket)

You should see WebSocketApp as one of the entries in the list.

from pythonpusherclient.

Nono242 avatar Nono242 commented on August 12, 2024

Hello ekulyk,

I thought my message was deleted ... I had to reinstall websocket-client from Liris; After that I didn't have the error anymore. The websocket had been rebuilt before the error occured.

Thank you for the answer.

Arnaud

from pythonpusherclient.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.