Error: No module named 'upstox_client' / When using your 'websocket_client.py’

Hi Team, When I am using ‘websocket_client.py’

I got the below error:

ModuleNotFoundError: No module named ‘upstox_client’

How to fix ?

@NSPriya

It’s great to have you join our community! Your enthusiasm for utilizing the Upstox API is much appreciated.

Before you proceed with the implementation, we suggest going through the information provided in our Readme file. It will guide you on how to install all the necessary packages needed to run the program successfully. Regarding the error you’ve encountered, it appears you might not have the upstox-python-sdk installed. Please refer to the readme file for guidance and try again.

Thank you!

Thank you very much for your response @shanmu.
Now I fixed that particular issue with all necessary package installation.
Now I am facing different error:

I am using the code ‘websocket_client.py’ which I got from upstox GitHub. I am running this code in ‘Colab.research’ cloud environment. When I am running the code, I got the below error: ( attached the same in screenshot )


RuntimeError Traceback (most recent call last)
in <cell line: 78>()
76
77 # Execute the function to fetch market data
—> 78 asyncio.run(fetch_market_data())

/usr/lib/python3.10/asyncio/runners.py in run(main, debug)
31 “”"
32 if events._get_running_loop() is not None:
—> 33 raise RuntimeError(
34 “asyncio.run() cannot be called from a running event loop”)
35

RuntimeError: asyncio.run() cannot be called from a running event loop