Hi Team,
I'm posting this question on behalf of user below.
He is getting this error ModuleNotFoundError: No module named 'lseg'
It's his first time to use Python API. Kindly advice.
Client provided this SAMPLE CODE he used and the OUTPUT:
import lseg.data as ld
ld.open_session()
df = ld.get_data(
universe=['IBM.N', 'VOD.L'],
fields=['BID', 'ASK', 'TR.Revenue']
)
print(df)
Output:
runfile('C:/temp/test 3 API.py', wdir='C:/temp')
Traceback (most recent call last):
File "<ipython-input-1-d8098c30ce4b>", line 1, in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/temp/test 3 API.py", line 8, in <module>
ModuleNotFoundError: No module named 'lseg'
@alvin.ricafort
Thank you for reaching out to us.
The client needs to install the lseg-data Python library.
pip install lseg-data
For more information, please refer the Getting Started with Python quickstart.