Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (400 - BadRequest)) #43

Closed
ashishanand7 opened this issue Jul 4, 2022 · 0 comments

Comments

@ashishanand7
Copy link

ashishanand7 commented Jul 4, 2022

Issue #20 persists.

from jugaad_trader import Zerodha

kws = kite.ticker()

def on_ticks(ws, ticks):
    print("Ticks: {}".format(ticks))

def on_connect(ws, response):
    ws.subscribe([738561, 5633])
    ws.set_mode(ws.MODE_FULL, [738561])

def on_close(ws, code, reason):
    ws.stop()

kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.on_close = on_close

kws.connect()

Error
Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (400 - BadRequest))
Connection closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (400 - BadRequest))

Additional context
This was issue #20 and it persists for me.
Have latest jugaad-trader from source ( this repo )
Have kiteconnect = 4.1.0

Also tested the fix provided by #26 , it doesn't solve the issue.

@ashishanand7 ashishanand7 changed the title Issue #20 persists. Connection closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (400 - BadRequest)) Connection closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (400 - BadRequest)) Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant