...Python.InstrumentPricingAnalytics/blob/main/financial-contracts/Interest%20Rate%20Derivatives/Basis%20Swap%20Valuation.ipynb and got this error
@samer.mahfouz
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>
Error:2021-02-28 14:01:50,326 - Session session.platform - Thread 27328 | MainThreadERROR!!! 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 | MainThreadERROR!!! 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 | MainThreadERROR!!! 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 | MainThreadERROR!!! 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').
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?
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
@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.