Connection error: 1006 - connection was closed uncleanly (None)

kalpanakhokhar
I have was facing connection error(1006) while getting tick data, I tried the sample code provided at https://kite.trade/forum/discussion/7399/kiteconnect-ticker-connection-error-1006-connection-was-closed-uncleanly-none. It has somewhat resolved the issue but I still get this connection error after every 8-10 ticks. I have placed the screenshot here, could anyone please be kind enough to guide me on how to avoid such periodic error?
1.PNG 145K
  • rakeshr
    It looks like, you have a computation-heavy-threaded ticker. Maybe you can try solution 1, mentioned in the same thread.
  • kalpanakhokhar
    @rakeshr , Thank you for your reply, I tried solution 1,

    I don't know about celery, may be that's why I am getting this error.
    steps that i followed:
    1. I installed celery using pip install -U celery
    2. added import celery from Celery to the script
    3. suffixed .delay with helper_method function
    4. and it shows an error that
    helper_method.delay(ticks)
    builtins.AttributeError: 'function' object has no attribute 'delay'


    I think i need to learn more about celery, I'll go through tutorials and try again, will let you know.

    Thanks.
  • rakeshr
    You can go through this repo, which has an example for storing ticks using celery.
  • kalpanakhokhar
    @rakeshr, Thank you for prompt reply, My SSD has crashed so, I am not yet able to try your suggestion yet, I will let you know as soon as my PC gets restored. Thank you.
Sign In or Register to comment.