Giter VIP home page Giter VIP logo

Comments (6)

0x7466 avatar 0x7466 commented on June 12, 2024

Have you tested it with Python 3?

from python-actioncable-zwei.

pj-parthjoshi avatar pj-parthjoshi commented on June 12, 2024

No, Now will test with python 3 and will let you know

from python-actioncable-zwei.

pj-parthjoshi avatar pj-parthjoshi commented on June 12, 2024

Tested in Python 3.5.2 , not working

from python-actioncable-zwei.

0x7466 avatar 0x7466 commented on June 12, 2024

Test to create the connection directly with the websocket client and see if there is a Rails response:

Something like this:

import websocket

def on_event:
    pass

ws = websocket.WebSocketApp(
    <your_url>,
    cookie=<your_cookie>,
    on_message=on_event,
    on_close=on_event)

ws.run_forever(ping_interval=5, ping_timeout=3, origin=self.origin)

from python-actioncable-zwei.

pj-parthjoshi avatar pj-parthjoshi commented on June 12, 2024

Testing with above code does not respond but if i remove cookie param like below then it responds in rails
ws = websocket.WebSocketApp('ws://localhost:4000/cable',on_message=on_event,on_close=on_event)

Do, i need to check about websocket module version or something like that ?
Edited: websocket-client==0.44.0 is the version

Am mostly from rails background, so you might need to support me :)

Also one trick, can you support for header in websockets ?
ref: https://github.com/websocket-client/websocket-client/blob/9a28437252c7c953e208ed07ff1811d1dc7b8c41/websocket/_app.py#L58

from python-actioncable-zwei.

0x7466 avatar 0x7466 commented on June 12, 2024

It looks like it's a bug in the websocket-client lib. But you could try an older version of the library or use the new added header parameter.

from python-actioncable-zwei.

Related Issues (8)

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.