Python Websocket Threading - Main loop terminated issue

To all Python Gurus :)

I am simply trying to take the def on_ticks(ws, ticks): output and push it to a SQL server. I would highly highly appreciate if you could please help me with resolving a silly error.

I have included the screenshots of my code as well as the error. I have gone through some of the previosuly shared documentation however I know I am doing something very silly. Your kind support will be of great help.

Thank you again.

  • rakeshr
    You need to use Queue for heavy operation. Use solution 1, as mentioned in this thread.
  • ayan
    @rakeshr - Can you take a look at the issue and tell me based on your experience if queing will work?? I have tried to depict the details in the screenshot below.

    Also - just curious, shoudlnt the thread run on a new thread & not the main thread....I know I am doing something silly.

    Your fedback is super helpful.

Sign In or Register to comment.