unable to import websocket
-
@lavly
Have you installed Smart API library??
If not then go to cmd type : pip install smartapi-python
Hit enter. -
@djdenish installed. I'm getting my profile. But the codes given for WebSocket, order placement and gtt giving errors, like module not found or wrong indentation , define e. Etc
-
@lavly
Post your code and error -
@lavly said in unable to import websocket:
wrong indentation
This is a python error..
@lavly said in unable to import websocket:
But the codes given for WebSocket, order placement and gtt giving errors,
One step at a time. are you getting websockt data ?
-
@rajanprabu no
-
@djdenish from smartapi import WebSocket
Errorr
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-47-fd07382cedc0> in <module>()
----> 1 from smartapi import WebSocket2 frames
/usr/local/lib/python3.7/dist-packages/twisted/internet/ssl.py in <module>()
56
57 # System imports
---> 58 from OpenSSL import SSL
59
60 from zope.interface import implementer, implementer_only, implementedByModuleNotFoundError: No module named 'OpenSSL'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.To view examples of installing some common dependencies, click the
"Open Examples" button below. -
@lavly
open cmd type : pip install pyOpenSSL
hit enter.
after successful installation run your code again. -
@djdenish thanx
-
-