For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Problems retrieving data with Eikon API

Over the last two weeks, I have had frequent problems retrieving (daily) data from the Eikon API. The code has been running problem-free since July 2020. The rrror messages are below. Any ideas?


ERROR MESSAGE #1

{"NotFound: StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:\r\n{\r\n Connection: close\r\n Date: Tue, 09 Nov 2021 23:20:32 GMT\r\n Server: Microsoft-HTTPAPI/2.0\r\n Content-Length: 315\r\n Content-Type: text/html; charset=us-ascii\r\n}"}

ERROR MESSAGE #2

{"InternalServerError: <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \http://www.w3.org/TR/html4/strict.dtd\><html> [error message truncated due to length]

eikon-data-api
icon clock
10 |1500

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

Upvotes
Accepted
1.7k 2 4 7

hi @m.ward ,

Is it possible that after the first run after restarting the PC and Eikon, the credential is used to log in anywhere else?

I tried to reproduce the issue as Jirapongse suggested by

  1. Start PC and Eikon, the get_data function can be run properly
  2. Sign in to other apps using the same credential (here, I tried https://api.refinitiv.com/)
  3. Back to the code in step 1) and run it again, I get the same error as yours
    1. The title of the HTML is Sign In so it is a sign-in page of Eikon.

Please note that this error can occur with any app that uses the same credential (not just the API doc app mentioned in step 2)

To prevent this, please do not use the same credential to login in any app while the Eikon is running

Hope this could help

icon clock
10 |1500

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

Upvotes
1 0 0 0

Hi @raksina.samasiri ,

The code is in C#.

Relevant snippet below.

Please note that the code will run if I restart the PC. I.e. I try to run the code EOD; the error described previously is thrown; I restart the PC and re-run the code and it runs without problems. But why would I need to restart the PC to get the code to run?!


IEikon eikon = Eikon.CreateDataAPI();

eikon.SetAppKey(apiKey);

try

{

var tempVarRICs = eikon.GetDataRaw(ISINListDotCSV, new List<string>() { "TR.PreferredRIC" });

rawDataRICsAsList = Regex.Split(tempVarRICs.ToString(), @"(\[(?:\[??[^\[]*?\]))").ToList();

}

catch (Exception ex)

{

Console.WriteLine("Could not get preferred RICs");

}

icon clock
10 |1500

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

Upvotes
38.1k 71 35 53

@m.ward

The same Eikon account may be used on another machine while you are using Eikon Data API.

I got this exception in Eikon Data API if I used the same eikon account to log in to https://api.refinitiv.com.

EikonDataAPI.EikonException: InternalServerError: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>Sign In</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

The title of the HTML is Sign In so it is a sign-in page of Eikon.

Please share the full HTML message shown in the ERROR MESSAGE #2 so we can verify it.


icon clock
10 |1500

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

Upvotes
1 0 0 0

Thanks. I thought Eikon would sign a user out if they were logged in - e.g. if I was signed in at home but then log in when I get to work, I would expect to be signed out at home. It would seem this is not the case.

I'd also note that restarting the PC and restarting Eikon means the first error message does not appear.

---

Full text of the second error message is below.

{"InternalServerError: <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \http://www.w3.org/TR/html4/strict.dtd\><html><head><title>Sign In</title><meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/><META page=login><link rel=\"icon\" type=\"image/vnd.microsoft.icon\" href=\"/favicon.ico\"/><link rel=\"shortcut icon\" href=\"/favicon.ico\"/><link rel=\"stylesheet\" type=\"text/css\" href=\"/auth/css/charcoal_commonstyles_spr.css?v=_3.43.3501.01\"/><link rel=\"stylesheet\" type=\"text/css\" href=\"/auth/css/refinitiv_charcoal_loginstyles_spr.css?v=patchRFCharcoal12-12-20_3.43.3501.01\"/><script type=\"text/javascript\" src=\"/auth/js/signin_spr.js?v=_3.43.3501.01\"></script><script type=\"text/javascript\" src=\"/js/as.js?v=_3.43.3501.01\"></script><script src=\"/auth/js/jquery-1.10.1.min.js\"></script><script src=\"/auth/js/jquery-as.js?v=_3.43.3501.01\"></script><script type='text/javascript'>function openHelpLink(){var link=\https://my.refinitiv.com/content/mytr/en/productsupport.html\;window.open(link)}function initial(){elementFocus(\"AAA-AS-SI1-SE003\");$(\"#AAA-AS-SI1-SE008_Value\").val(\"FALSE\");$(\"#AAA-AS-SI1-SE008_CheckBox_TRUE\").checkbox({\"checkedValue\":\"TRUE\"});$(\"#AAA-AS-SI1-SE009\").click(asUtils.forwardClick(\"#AAA-AS-SI1-SE008_CheckBox_TRUE\"))};</script></head><body onload=\"initial()\" style=\"overflow:hidden;\"><div class='main'><div class=\"space_top\"></div><div class=\"content_center\"><div class=\"header\"><div class='header_bar_right'><div class='close_btn'><a class=\"close_icon\" id=\"AAA-AS-SI-SE023\" href=\"javascript:closeWindow();\" tabindex=\"-1\"></a></div><div class=\"language_bar\"><div class=\"language_box\" onclick=\"onClickLanguageBox('AAA-AS-SI-C005');\" onkeydown=\"return onPressLanguageBox(event, 'AAA-AS-SI-C005');\"><div class=\"language_select\" onmouseover='changeHover(this,\"language_select\",true)' onmouseout='changeHover(this,\"language_select\",false)' onfocus='changeHover(this,\"language_select\",true)' onblur='changeHover(this,\"language_select\",false)' tabIndex=\"8\"><div class=\"language_text\" id='AAA-AS-SI-SE020'>English\n</div></div><div id=\"AAA-AS-SI-C005\" class=\"language_list_box\"><a id=\"en-US\" class=\"language_item\" onclick=\"onSelectLanguage('en-US', '/auth/UI/Login?MinorVersion=0&RequestID=DEC05D65399CD383906F66AC03BF17729722F6E9C509835999D17A89B328A52A&theme=charcoal&ProviderID=https%3A%2F%2Famers1.proxy.cp.thomsonreuters.com%3A443%2Famagent &IssueInstant=2021-11-08T23%3A44%3A50Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Famers1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253D0b98da57-fa97-6a44-a048-74b4f32b8fa0%2526srv%253DPLNP-ERPCPRP08%26MinorVersion%3D0%26RequestID%3DDEC05D65399CD383906F66AC03BF17729722F6E9C509835999D17A89B328A52A%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Famers1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-11-08T23%253A44%253A50Z%26MajorVersion%3D1%26locale%3Den-US&locale=en-US' ,'AAA-AS-SI-C005', 'AAA-AS-SI-C004', 'AAA-AS-SI-SE020')\" href=\"#\" tabIndex='-1'> English </a><a id=\"ja-JP\" class=\"language_item\" onclick=\"onSelectLanguage('ja-JP', '/auth/UI/Login?MinorVersion=0&RequestID=DEC05D65399CD383906F66AC03BF17729722F6E9C509835999D17A89B328A52A&theme=charcoal&ProviderID=https%3A%2F%2Famers1.proxy.cp.thomsonreuters.com%3A443%2Famagent &IssueInstant=2021-11-08T23%3A44%3A50Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Famers1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253D0b98da57-fa97-6a44-a048-74b4f32b8fa0%2526srv%253DPLNP-ERPCPRP08%26MinorVersion%3D0%26RequestID%3DDEC05D65399CD383906F66AC03BF17729722F6E9C509835999D17A89B328A52A%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Famers1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-11-08T23%253A44%253A50Z%26MajorVersion%3D1%26locale%3Dja-JP&locale=ja-JP' ,'AAA-AS-SI-C005', 'AAA-AS-SI-C004', 'AAA-AS-SI-SE020')\" href=\"#\" tabIndex='-1'> 日本語 </a><a id=\"zh-CN\" class=\"language_item\" onclick=\"onSelectLanguage('zh-CN', '/auth/UI/Login?MinorVersion=0&RequestID=DEC05D65399CD383906F66AC03BF17729722F6E9C509835999D17A89B328A52A&theme=charcoal&ProviderID=https%3A%2F%2Famers1.proxy.cp.thomsonreuters.com%3A443%2Famagent &IssueInstant=2021-11-08T23%3A44%3A50Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Famers1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253D0b98da57-fa97-6a44-a048-74b4f32b8fa0%2526srv%253DPLNP-ERPCPRP08%26MinorVersion%3D0%26RequestID%3DDEC05D65399CD383906F66AC03BF17729722F6E9C509835999D17A89B328A52A%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Famers1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-11-08T23%253A44%253A50Z%26MajorVersion%3D1%26locale%3Dzh-CN&locale=zh-CN' ,'AAA-AS-SI-C005', 'AAA-AS-SI-C004', 'AAA-AS-SI-SE020')\" href=\"#\" tabIndex='-1'> 中文简体 </a></div><input class='hiddensubmit' type=\"hidden\" id=\"AAA-AS-SI-C004\" name=\"AAA-AS-SI-C004\" value=\"en-US\"/></div></div></div></div><div class=\"body_main\"><div class=\"signin_body_content\"><div class=\"body_brand\"><div id=\"AAA-AS-SI-SE006\" class=\"product_brand_image\"></div></div><div class=\"body_input\"><form name=\"frmSignIn\" action=\"blank\" onSubmit=\"return defaultSubmit('AAA-AS-SI1-SE014')\" method=\"post\"><table width='100%' cellspacing=\"1\" cellpadding=\"0\" border=\"0\"><tr class='signin_input_row'><td width='76px'><label class='topic_txt' id=\"AAA-AS-SI1-SE002\" for='IDToken1'> User ID: </label></td><td><div class=\"textbox_img textbox_img_big2\"><input type=\"text\" id=\"AAA-AS-SI1-SE003\" name=\"IDToken1\" value=\"\" autocomplete=\"off\" tabIndex='1'/></div></td></tr><tr class='signin_userid_hint'><td>&nbsp;</td><td><label class=\"small_font \" id=\"AAA-AS-SI1-SE004\">Hint: This is usually your work email address</label></td></tr><tr class='signin_input_row'><td><label class='topic_txt' id=\"AAA-AS-SI1-SE005\" for=\"IDToken2\"> Password: </label></td><td><div class=\"textbox_img textbox_img_normal\"><input type=\"password\" id=\"AAA-AS-SI1-SE006\" tabIndex=\"2\" name=\"IDToken2\" value=\"\" autocomplete=\"off\"/></div></td></tr><tr><td>&nbsp;</td><td><a id=\"AAA-AS-SI1-SE007\" href=\"javascript:requestForgottenPassword(document.frmRequestFP,document.getElementById('AAA-AS-SI1-SE003').value,'en-US','charcoal','refinitiv','null');\" tabIndex=\"5\"> Forgotten your password? </a></td></tr></table><div class='signin_autoarea'><div id=\"AAA-AS-SI1-SE008\"><a id=\"AAA-AS-SI1-SE008_CheckBox_TRUE\" class=\"checkbox\" href=\"javascript:void(0)\" tabIndex=\"3\" data-value=\"#AAA-AS-SI1-SE008_Value\"></a> &nbsp; <a id=\"AAA-AS-SI1-SE009\" class='checkbox_label' href=\"javascript:void(0)\" tabIndex=\"-1\"> Sign me in automatically </a><input type=\"hidden\" class='hiddensubmit' id=\"AAA-AS-SI1-SE008_Value\" name=\"IDToken3\" value=\"FALSE\"/></div><div class=\"small_font signin_autohint \" id=\"AAA-AS-SI1-SE010\"> Do not use if device is shared. </div><input id=\"Submit1\" type=\"submit\" class=\"hiddensubmit\" hideFocus=\"true\" tabIndex='-1'/></div><div class='buttonarea' id=\"buttonarea_AAA-AS-SI1\"><script type='text/javascript'>createImageButton(\"AAA-AS-SI1-SE014\",\"Sign In\",\"defaultSubmit(\\\\'AAA-AS-SI1-SE014\\\\')\",4,\"button_75\",true);createImageButton(\"AAA-AS-SI1-SE015\",\"Cancel\",\"closeWindow()\",7,\"button_75\");</script></div><div class=\"signin_errormsg\" id=\"AAA-AS-SI1-SE012\"></div></form></div></div></div><div class=\"footer\"><div id=\"AAA-AS-SI-SE009\" class=\"footer_sep\"></div><div class=\"footer_content\"><a id=\"AAA-AS-SI-SE015\" href=\https://my.refinitiv.com/content/mytr/en/signin.html\ target=\"_blank\" tabIndex=\"9\"> MyRefinitiv </a><span class=\"footer_content_sep\"></span><a id=\"AAA-AS-SI-SE016\" href=\https://www.refinitiv.com/en/policies/privacy-statement\ target=\"_blank\" tabIndex=\"10\"> Privacy Statement </a><span class=\"footer_content_sep\"></span><a id=\"AAA-AS-SI-SE017\" href=\https://www.refinitiv.com/en/about-us\ target=\"_blank\" tabIndex=\"11\"> About Us </a><span class=\"footer_content_sep\"></span><a id=\"AAA-AS-SI-SE012\" href=\https://my.refinitiv.com/content/mytr/en/productsupport.html\ target=\"_blank\" tabIndex=\"12\"> Help </a></div></div></div></div><form name=\"frmRequestFP\" action=\"\" method=\"post\"><input type=\"hidden\" name=\"userId\" value=\"\"/><input type=\"hidden\" name=\"locale\" value=\"\"/></form><form name=\"Login\" action=\"/auth/UI/Login\" method=\"post\"><input type=\"hidden\" name=\"goto\" value=\"L2F1dGgvY2Rjc2VydmxldD9UQVJHRVQ9aHR0cHMlM0ElMkYlMkZhbWVyczEuYXBwcy5jcC50aG9tc29ucmV1dGVycy5jb20lMkZBcHBzJTJGVURGJTJGTVNGJTNGYW1wb3N0cHJlc2VydmUlM0QwYjk4ZGE1Ny1mYTk3LTZhNDQtYTA0OC03NGI0ZjMyYjhmYTAlMjZzcnYlM0RQTE5QLUVSUENQUlAwOCZNaW5vclZlcnNpb249MCZSZXF1ZXN0SUQ9REVDMDVENjUzOTlDRDM4MzkwNkY2NkFDMDNCRjE3NzI5NzIyRjZFOUM1MDk4MzU5OTlEMTdBODlCMzI4QTUyQSZ0aGVtZT1jaGFyY29hbCZQcm92aWRlcklEPWh0dHBzJTNBJTJGJTJGYW1lcnMxLnByb3h5LmNwLnRob21zb25yZXV0ZXJzLmNvbSUzQTQ0MyUyRmFtYWdlbnQmSXNzdWVJbnN0YW50PTIwMjEtMTEtMDhUMjMlM0E0NCUzQTUwWiZNYWpvclZlcnNpb249MQ==\"/><input type=\"hidden\" name=\"encoded\" value=\"true\"/><input type=\"hidden\" name=\"locale\" value=\"en-US\"/><input type=\"hidden\" name=\"product\" value=\"\"/><input type=\"hidden\" name=\"eso\" value=\"\"/><input type=\"hidden\" name=\"username\" value=\"\"/><input type=\"hidden\" name=\"IDButton\" value=''/><input type=\"hidden\" name=\"fs\" value=\"\"/><input type=\"hidden\" name=\"epaid\" value=\"\"/><input type=\"hidden\" name=\"realm\" value=\"\"/><input type='hidden' name='IDToken1'/><input type='hidden' name='IDToken2'/><input type='hidden' name='IDToken3'/><input type='hidden' name='IDToken4'/><input type=\"hidden\" name=\"gx_charset\" value=\"UTF-8\"/></form></body></html>"}

icon clock
10 |1500

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

Click below to post an Idea Post Idea