Read time data stream not working in Jupyter Notebook

Hi I was just trying out the real time quote data function, and it doesn’t seem to run in Jupyter Notebook (VSCode), but seems to run fine as a .py file in PyCharm.

from import CryptoDataStream
from config import *

wss_client = CryptoDataStream(API_KEY, SECRET_KEY)

async def quote_data_handler(data):

wss_client.subscribe_quotes(quote_data_handler, “BTC/USD”)

This returns the error “RuntimeError : cannot be called from a running event loop”. Does anyone know how to troubleshoot this? Any help is appreciated.