unable to import websocket
-
@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. -
@rajanprabu no
-
@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 ?
-
@lavly
Post your code and error -
@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
Have you installed Smart API library??
If not then go to cmd type : pip install smartapi-python
Hit enter. -
@James-Bond it suppor pip pip3 is not working
-
@James-Bond i am working with Google collaboratory. I'm getting my profile. Evry thing is ok.
When I put cmd from smartapi import Web Socket it shows error no module found -
@lavly
Which pip version (pip or pip3) you used to install SmartAPI Python SDK and which Python version you're using ?
Most probably this error occurs due to conflicting versions of pip and python while installing library. -