Comments (6)
Have you tested it with Python 3?
from python-actioncable-zwei.
No, Now will test with python 3 and will let you know
from python-actioncable-zwei.
Tested in Python 3.5.2 , not working
from python-actioncable-zwei.
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.
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.
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)
- ModuleNotFoundError in examples HOT 1
- Outdated README/version number HOT 1
- Running example code does not connect to server HOT 8
- Callback reference missing in Subscription example HOT 1
- Channels stuck in a 'pending' state HOT 2
- Cant suscribe to Channels, get stuck in 'pending' state
- Can't seem to work because of error on callbacks HOT 2
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 python-actioncable-zwei.