question

Upvotes
Accepted
7 1 0 1

Error when connecting to refinitiv-data module

Hi, I am using the following code to connect to Refinitiv using the Refinitiv-data module, but I am encountering some session error. What can be done about it?

1705526167589.png


1705526179866.png

eikon-data-apipython#technologyrefinitiv-data-platform-librariestime-out
1705526167589.png (22.1 KiB)
1705526179866.png (49.9 KiB)
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
Accepted
14.1k 30 5 10

Hi @donia.augustine ,

As seen in the code you provided, seems like you're using the Platform session, could you please confirm that the account used is RDP (Refinitiv Data Platform) account or the account that used to login to Eikon Desktop/Refinitiv Workspace? As the platform session requires the Data Platform account as mentioned in Quick Start Guide of RD Library

or if you don't have a platform account, you can try opening the desktop session with the code below (and having the Eikon Desktop or Refinitiv Workspace up and running on the same machine used to run the code)

rd.open_session(app_key = APP_KEY)

I hope this helps and please let me know in case you have any further questions.

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
78.6k 248 52 74

@donia.augustine

Thank you for reaching out to us.

I found the ConnectionTimeout('timed out') error in on the screenshot. It could be the connection issue.

1705554109631.pngYou can enable the debug log and increase timeout value by using the following code.

config = rd.get_config()
config.set_param("logs.transports.console.enabled",True)
config.set_param("logs.level","debug")
config.set_param("http.request-timeout", 60000)
session = rd.session.platform.Definition(
    app_key = '87***',
    grant = rd.session.platform.GrantPassword(
        username='***',
        password='***')
).get_session()

You can share the console log. Please remove your username and password from the log before sharing.


1705554109631.png (33.7 KiB)
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.

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.