question

Upvotes
Accepted
31 1 1 6

ReadTimeout('The read operation timed out')

I want to get the constituents of the ETF IEUS.DE with this part of a Jupyter Notebook:

rd.open_session()
# Get constituents for ETF
response2 = fundamental_and_reference.Definition(
universe = "IEUS.DE",
fields = ["TR.ETPConstituentRIC,TR.ETPConstituentName"],
).get_data()

response2.data.df


I get the error

An error occurred while requesting URL('https://api.refinitiv.com/data/datagrid/beta1/').
    ReadTimeout('The read operation timed out')


When doing a similar request for STOXX with "TR.CommonName", everything works fine.

What should I do to avoid this error?



refinitiv-data-platformfundamental-data
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.

Upvote
Accepted
76.8k 239 52 72

@torben1

Thank you for reaching out to us.

You can try to increase the HTTP Request Timeout by changing its value in the Refinitiv Data Library configuration file (refinitiv-data.config.json).

{
    "http": {        
        "request-timeout": 60        
    },
  "logs": {
    "level": "debug",
    "transports": {
      "console": {
        "enabled": false
      },
      "file": {
        "enabled": false,
        "name": "refinitiv-data-lib.log"
      }
    }
  },
  "sessions": {
    "default": "desktop.workspace",
...

To load the configuration file, please refer to the example on GitHub.

1688528194730.png


1688528194730.png (55.3 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
31 1 1 6

Thank You very much! I increased the request-timeout to 120 and now it works!


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.