--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[90], line 9 1** from** fyers_apiv3.FyersWebsocket import data_ws 3** fyers = data_ws.FyersDataSocket( 4 access_token=“6J5PBSUZWK-100:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuZnllcnMuaW4iLCJpYXQiOjE3MjU0MjMyNzAsImV4cCI6MTcyNTQ5NjIzMCwibmJmIjoxNzI1NDIzMjcwLCJhdWQiOlsieDowIiwieDoxIiwiZDoxIiwiZDoyIiwieDowIl0sInN1YiI6ImFjY2Vzc190b2tlbiIsImF0X2hhc2giOiJnQUFBQUFCbTE5Nm1OLWlVLXlNMEJSRGZJMnlhejZKMlRpMzBLZVBuTXBZSFhYLVgydy1YS0U1UWVYMFdqMThPajRPUFB4UFYtU0N1TVhsQWNiYWJWOUtSLTZNQ3J1c0xEclh3czg3LU5veUowYS1TTEZTMTFMRT0iLCJkaXNwbGF5X25hbWUiOiJBU0hJU0ggSCBQQVRFTCIsIm9tcyI6IksxIiwiaHNtX2tleSI6ImM4ZWE1YWQ4ZGFiMzkyNzFlNGIzMzM0YjJmNDY3ZjEyMzFkOGJhZDRkMTRmZTdkZWE0ODAxZTYwIiwiZnlfaWQiOiJYQTAwNTIzIiwiYXBwVHlwZSI6MTAwLCJwb2FfZmxhZyI6IlkifQ.X–EWxJM7vFUMR2Fi6kSZTs5mfVQ6sjez9p5RYPoKZc”, # Access token in the format “appid:accesstoken”** 5** log_path=“”, # Path to save logs. Leave empty to auto-create logs in the current directory.** 6** litemode=False**, # Lite mode disabled. Set to True if you want a lite response. 7** write_to_file=False**, # Save response in a log file instead of printing it. 8** reconnect=True**, # Enable auto-reconnection to WebSocket on disconnection. ----> 9 on_connect=onopen, # Callback function to subscribe to data upon connection. 10** on_close=onclose, # Callback function to handle WebSocket connection close events.** 11** on_error=onerror, # Callback function to handle WebSocket errors.** 12** on_message=onmessage, # Callback function to handle incoming messages from the WebSocket.** 13** reconnect_retry=10 # Number of times reconnection will be attepmted in case** 14** ) **NameError: name ‘onopen’ is not defined
thanks the issue is with anaconda - multiple environrments. i have uninstalled that now the issue is resolved. Tell everyone not to use conda on mac it creates lot of conflicts. i have installed it 3 times eveytime it is creating errors now i have uninstalled it. Thanks for the support.