Get Eikon RIC data from lseg-data python module - getting exception "Exception infer_objects() got "

raghava.belagola
edited April 9 in Eikon Data APIs
For the code below - not able to get RIC data. kindly suggest any other way via python which i can run on lseg internal platforms like Sparrow.
error is "Exception infer_objects() got an unexpected keyword argument 'copy'"
<code>import os#from dotenv import dotenv_valuesimport lseg.data as ldfrom lseg.data import sessionfrom lseg.data.content import fundamental_and_reference#config = dotenv_values(".env")if __name__=='__main__':    try:        session = ld.session.platform.Definition(            app_key ='b1547167b0594853800f4a741c0e5c327f7cded9',            grant = ld.session.platform.GrantPassword(                username ='username',                password ='pass'            ),            signon_control=True        ).get_session()        session.open()        print(f'Session Status: {session.open_state}')        if str(session.open_state) == 'OpenState.Opened':            ld.session.set_default(session)            response = fundamental_and_reference.Definition(                universe= ["TRI.N", "IBM.N"],                fields=["TR.Revenue", "TR.GrossProfit"]            ).get_data()            print(response.data.df)    except Exception as exp:        print(f'Exception {exp}')    finally:        ld.close_session()</code>

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @raghava.belagola

    Thank you for reaching out to us.

    I can run the code properly.

    image.png

    You may need to add the code to print the call stack when the exception occurred.

    What are the LSEG internal platforms (Sparrow)?

  • Sparrow platform is used to host our python scripts , which will update RIC which are viewed by client. hope its fine to run the python apps on such platforms.

    Seems issue is due to 1.4.3 panda - trying to upgrade to 2.2.3.

    Will get back if i need help