Not able to Subscribe the any symbol

What would be the probable issue on my system, because even copy paste code is also not working.

Code:

from fyers_api.Websocket import ws
import os


def run_process_symbol_data(access_token):
    data_type = "symbolData"
    symbol = ["NSE:SBIN-EQ"]
    fs = ws.FyersSocket(access_token=access_token,run_background=False, log_path=os.getcwd())
    fs.websocket_data = custom_message
    fs.subscribe(symbol=symbol, data_type=data_type)
    fs.keep_running()


def custom_message(msg):
    print(f"Custom:{msg}")


def main():
    access_token = "xxxxxxxx:xxxxxxxxxxxxxxxxxxx"
    run_process_symbol_data(access_token)


if __name__ == '__main__':
    main()

Error msg:

Fyers-API version:

Please help me out on this issue.

4 replies