Been banging my head on this for a week now... i've uninstalled and reinstalled in all possible configurations and get the same error. I've tried the above method and get a confirmation that "Successfully installed kiteconnect-3.7.0b3"
ERROR:kiteconnect.ticker:WebSocket connection lost: [Failure instance: Traceback (failure with no frames): : Connection was aborted locally, using. ].
def on_connect(ws, response): # Callback on successful connect. # Subscribe to a list of instrument_tokens (RELIANCE and ACC here). ws.subscribe([738561, 5633])
# Set RELIANCE to tick in `full` mode. ws.set_mode(ws.MODE_FULL, [738561])
# Assign the callbacks. kws.on_ticks = on_ticks kws.on_connect = on_connect
# Infinite loop on the main thread. Nothing after this will run. # You have to use the pre-defined callbacks to manage subscriptions. kws.connect()
@sujith Nope... doesn't help... tried that as well... how long before the previous version of kite is phased out? i need to move some websocket applications and getting worried.
@rakeshr Here is the code... its the example from github with the logging removed and a few print statements added. none of the print statements get executed.
from kiteconnect import KiteTicker # Initialise kws = KiteTicker("api-key", "accesstoken")
def on_ticks(ws, ticks): # Callback to receive ticks. print("here3") print(ticks)
def on_connect(ws, response): # Callback on successful connect. # Subscribe to a list of instrument_tokens (RELIANCE and ACC here). print("here0") ws.subscribe([738561, 5633]) print("here1")
# Set RELIANCE to tick in `full` mode. ws.set_mode(ws.MODE_FULL, [738561]) print("here2")
# Assign the callbacks. kws.on_ticks = on_ticks kws.on_connect = on_connect
# Infinite loop on the main thread. Nothing after this will run. # You have to use the pre-defined callbacks to manage subscriptions. kws.connect()
Today i took a brand new laptop, installed ubuntu 16.04 64-bit, anaconda with python3.6 and tried this again... and got the exact same error. wondering if this could be related to my account - DP3211 / Are there any dummy account ids for testing?
I do not think there is any dummy account or sandbox environment for testing. I am facing the same issue. Websocket connect that started before 09:05 is running fine but connection that started after 10:00 is not working. Both have same code, only the Database name is different
@pracas, There have been multiple beta releases to this channel. Hence I am asking what is the exact kiteconnect version you are using? You need to be on the latest version of kiteconnect. If not then, you need to do
@sujith kiteconnect 3.7.0b3 thats what got installed on both the systems when i ran In addition today i tried uninstalling and reinstalling, i get the same error with 3.7.0b4 aswell. Additional Dependecy version list as follows. I think the problem m
@Vivek, thats the full log that gets printed in the terminal. any other suggested locations to dig for other log files that may help? I'm using Anaconda on ubuntu16.04... will try installing this on a third system today.
Tried installing on the only windows 7 system i have and installation fails when installing the twisted package... any help anyone on getting this sorted linux?
@guhan... yes.. but i figured getting it running in windows won't help as finally i want to run it in linux... in linux everything installs fine.. however the error persists (refer to the first post)
@pracas, oh k, I am not a expert in programming and all, but from my experience of trial and error, the error you have mentioned occurs if there is some runtime or logical error in your code, for example I got this error when database name was wrong, also due to column mismatch etc..
FYI I am running my strategy in Linux 16.04, python 2.7(that comes with linux not anaconda)
@ramatius ... Well tried running as root... same error as well
@sujith yup.. installed everything like there multiple times....
today as a trial i installed this on my remote server and get a new error "Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))"
i hope access token refers to request_token returned in the url (wherever access_token is mentioned) kindly correct me if i'm wrong.
The only thing left seems to be if someone @zerodha can check if this is something to do with my developer credentials...
@pracas, The above error means you are sending invalid access token. A request token is different from access token. Please go through documentation here.
Please make sure you are using the latest release.
pip install kiteconnect --upgrade --pre
Been banging my head on this for a week now... i've uninstalled and reinstalled in all possible configurations and get the same error. I've tried the above method and get a confirmation that "Successfully installed kiteconnect-3.7.0b3"
ERROR:kiteconnect.ticker:WebSocket connection lost: [Failure instance: Traceback (failure with no frames): : Connection was aborted locally, using. ].
code used is a simple print
ERROR:kiteconnect.ticker:Try reconnecting. Retry attempt count: 1
ERROR:kiteconnect.ticker:WebSocket connection lost: [Failure instance: Traceback (failure with no frames): /<"class 'twisted.internet.error.ConnectionAborted'/>: Connection was aborted locally, using.
].
Can you paste you code here?
There have been multiple beta releases to this channel. Hence I am asking what is the exact kiteconnect version you are using? You need to be on the latest version of kiteconnect.
If not then, you need to do
The platform shouldn't be a problem. It will work on all the OS.
In addition today i tried uninstalling and reinstalling, i get the same error with 3.7.0b4 aswell.
Additional Dependecy version list as follows. I think the problem m
requests 2.18.4
six 1.11.0
autobahn 17.10.1
Twisted 17.9.0
pyOpenSSL 17.5.0
service-identity 17.0.0
enum34
python-dateutil 2.6.1
chardet 3.0.4
certifi 2018.1.18
idna 2.6
urllib3 1.22
txaio 2.8.2
incremental 17.5.0
constantly 15.1.0
Automat 0.6.0
zope.interface 4.4.3
hyperlink 17.3.1
cryptography 2.1.4
attrs 17.4.0
pyasn1 0.4.2
pyasn1-modules 0.2.1
setuptools 38.5.1
cffi 1.11.4
asn1crypto 0.24.0
pycparser 2.18
oh k, I am not a expert in programming and all, but from my experience of trial and error, the error you have mentioned occurs if there is some runtime or logical error in your code, for example I got this error when database name was wrong, also due to column mismatch etc..
FYI I am running my strategy in Linux 16.04, python 2.7(that comes with linux not anaconda)
Can you check installing the client section here?
@sujith yup.. installed everything like there multiple times....
today as a trial i installed this on my remote server and get a new error
"Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))"
i hope access token refers to request_token returned in the url (wherever access_token is mentioned) kindly correct me if i'm wrong.
The only thing left seems to be if someone @zerodha can check if this is something to do with my developer credentials...
The above error means you are sending invalid access token.
A request token is different from access token. Please go through documentation here.