question

Upvotes
Accepted
16 0 0 2

I am just running the provided examples. https://github.com/Refinitiv-API-Samples/Example.RDPAPI.Python.InstrumentPricingAnalytics/blob/main/financial-contracts/Interest%20Rate%20Derivatives/Basis%20Swap%20Valuation.ipynb and got this error

@samer.mahfouz

rdp-apirefinitiv-data-platform
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
4.3k 2 4 5

Hi @elviejane.balmes,

You should add session.set_log_level(1) to get more detail.

On my side, it doesn't work because of following, I didn't get same result but result is None:

print(response.data.raw)
None

print("Error code:", response.error_code)
print(response.error_message)

Error_code: 503
<html> <head><title>503 Service Temporarily Unavailable</title><script type="text/javascript" src="/ruxitagentjs_ICA2SVfqru_10209210209190405.js" data-dtconfig="rid=RID_1587191951|rpid=-42746178|domain=reutest.com|reportUrl=/rb_bf83661jww|app=ea7c4b59f27d43eb|featureHash=ICA2SVfqru|vcv=2|xb=^bs/EikonLibrary^bs/LibraryServerSvc^bs.svc^bs/download|rdnt=1|uxrgce=1|bp=3|cuc=vfgpmaot|mel=100000|dpvc=1|lastModification=1614246571307|dtVersion=10209210209190405|tp=500,50,0,1|uxdcw=1500|vs=2|agentUri=/ruxitagentjs_ICA2SVfqru_10209210209190405.js"></script></head> <body> <center><h1>503 Service Temporarily Unavailable</h1></center> </body> </html>


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
16 0 0 2

Error:
2021-02-28 14:01:50,326 - Session session.platform - Thread 27328 | MainThread
ERROR!!! An error occured while requesting URL('https://api.refinitiv.com/data/quantitative-analytics/v1/financial-contracts').
2021-02-28 14:01:50,326 - Session session.platform - Thread 27328 | MainThread
ERROR!!! An error occured while requesting URL('https://api.refinitiv.com/data/quantitative-analytics/v1/financial-contracts').
2021-02-28 14:01:50,326 - Session session.platform - Thread 27328 | MainThread
ERROR!!! An error occured while requesting URL('https://api.refinitiv.com/data/quantitative-analytics/v1/financial-contracts').
2021-02-28 14:01:50,326 - Session session.platform - Thread 27328 | MainThread
ERROR!!! An error occured while requesting URL('https://api.refinitiv.com/data/quantitative-analytics/v1/financial-contracts'). Error: 2021-02-28 14:01:50,326 - Session session.platform - Thread 27328 | MainThread ERROR!!! An error occured while requesting URL('https://api.refinitiv.com/data/quantitative-analytics/v1/financial-contracts').

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
1 0 0 0

A problem/comment more than an answer that may help finding the issue:
It works for me the first time I run the code after a jupyter kernel start. I have issues in running it again. It is as if some history is causing issues in the second run as no new token is being requested or previous session not closed properly! Is session.open() an asynchronous session? How do you select the session type; synchronous or asynchronous?

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
83 1 1 2

Hello

I just see this post now. I don't reproduce the error and from the message I believe there was a temporary unavailability of the service. I assume the example runs fine now.


best regards

Samuel


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
39.4k 77 11 27

@samer.mahfouz1

Have you been able to make any progress in troubleshooting the issue?
With regard to your question, I'm not sure what you mean by "asynchronous session". I assume you open a platform session, right? Once opened, the session stays open unless you close it. Under the hood RDP Library is refreshing the token as required by RDP platform. Could you check the session state by calling get_open_state method? And, as @pierre.faurel suggested, use session.set_log_level(1) to create a more verbose log, which will hopefully shed some light on why the request to IPA endpoint fails.

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.