question

Upvotes
1 0 0 0

How to properly open a Platform session?

I am trying to open a platform session in Python using the following guide:

Example.DataLibrary.Python/Examples/4-Session/EX-4.01.01-Sessions.ipynb at lseg-data-examples · LSEG-API-Samples/Example.DataLibrary.Python · GitHub

However, it systematically fails. The code either runs indefinitely or returns a timed-out error.

I have properly modified the configuration file to specify my userID, UserPWD, and AppKey, and passed the path to the function open_session as follows:


import lseg.data as ld

ld.open_session(name='platform.ldp', config_name=".../LSEG API/Configuration/lseg-data.config.json")

session
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
15.5k 33 5 10

Hi @KPLUZANSKI ,

Could you please provide the content in the configuration file for further investigation (with your credentails/user ID, app key removed)

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Here my configuration file:


{

"logs": {

"level": "debug",

"transports": {

"console": {

"enabled": false

},

"file": {

"enabled": false,

"name": "lseg-data-lib.log"

}

}

},

"sessions": {

"default": "platform.ldp",

"platform": {

"ldp": {

"app-key": "xxx",

"username": "email",

"password": "xxx"

}

},

"desktop": {

"workspace": {

"app-key": "xxx"

}

}

}

}

With the following error message:


An error occurred while requesting URL('https://api.refinitiv.com/auth/oauth2/v1/token'). ConnectTimeout('[WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')[Error 0] - {}

Upvotes
27.7k 67 18 14

Hello @KPLUZANSKI

Did you check the step-by-step guide on this LSEG Data Library for Python page yet?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes I followed this guide, thanks.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.