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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
12 4 1 3

Equity Screener Python

Good afternoon

I updated the Python package of Eikon to 1.1.8.

I have always been running several equity screeners that I built in Excel in Python. Unfortunately, I receive the following error when I run my code (code wasn't changed):

fields=['TR.ISIN','CF_CURR','TR.ExchangeCountryCode']
each_request = "SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeCountryCode,AU), TR.AvgDailyValTraded52W>=500000, IN(TR.InstrumentTypeCode,FULLPAID,ORD,STAPLED), TR.CompanyMarketCap>=0, NOT_IN(TR.TRBCBusinessSectorCode,5550), CURN=EUR)"

loop_screen, error =ek.get_data(each_request,fields)


2021-01-07 13:56:24,221 P[23940] [MainThread 17184] Failed to decode response to json: <!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
</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=6D90378E0A766562C5AFCD4E16044398F7C725B4996B2994FEE4179F82AF049A&theme=charcoal&ProviderID=https%3A%2F%2Femea1.proxy.cp.thomsonreuters.com%3A443%2Famagent&IssueInstant=2021-01-07T12%3A56%3A24Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Femea1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253Dd26384eb-5eff-7d4f-9729-ef240798e527%2526srv%253DDTCP-ERPCPRP01%26MinorVersion%3D0%26RequestID%3D6D90378E0A766562C5AFCD4E16044398F7C725B4996B2994FEE4179F82AF049A%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Femea1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-01-07T12%253A56%253A24Z%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=6D90378E0A766562C5AFCD4E16044398F7C725B4996B2994FEE4179F82AF049A&theme=charcoal&ProviderID=https%3A%2F%2Femea1.proxy.cp.thomsonreuters.com%3A443%2Famagent&IssueInstant=2021-01-07T12%3A56%3A24Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Femea1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253Dd26384eb-5eff-7d4f-9729-ef240798e527%2526srv%253DDTCP-ERPCPRP01%26MinorVersion%3D0%26RequestID%3D6D90378E0A766562C5AFCD4E16044398F7C725B4996B2994FEE4179F82AF049A%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Femea1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-01-07T12%253A56%253A24Z%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=6D90378E0A766562C5AFCD4E16044398F7C725B4996B2994FEE4179F82AF049A&theme=charcoal&ProviderID=https%3A%2F%2Femea1.proxy.cp.thomsonreuters.com%3A443%2Famagent&IssueInstant=2021-01-07T12%3A56%3A24Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Femea1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253Dd26384eb-5eff-7d4f-9729-ef240798e527%2526srv%253DDTCP-ERPCPRP01%26MinorVersion%3D0%26RequestID%3D6D90378E0A766562C5AFCD4E16044398F7C725B4996B2994FEE4179F82AF049A%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Femea1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-01-07T12%253A56%253A24Z%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="L2F1dGgvY2Rjc2VydmxldD9UQVJHRVQ9aHR0cHMlM0ElMkYlMkZlbWVhMS5hcHBzLmNwLnRob21zb25yZXV0ZXJzLmNvbSUyRkFwcHMlMkZVREYlMkZNU0YlM0ZhbXBvc3RwcmVzZXJ2ZSUzRGQyNjM4NGViLTVlZmYtN2Q0Zi05NzI5LWVmMjQwNzk4ZTUyNyUyNnNydiUzRERUQ1AtRVJQQ1BSUDAxJk1pbm9yVmVyc2lvbj0wJlJlcXVlc3RJRD02RDkwMzc4RTBBNzY2NTYyQzVBRkNENEUxNjA0NDM5OEY3QzcyNUI0OTk2QjI5OTRGRUU0MTc5RjgyQUYwNDlBJnRoZW1lPWNoYXJjb2FsJlByb3ZpZGVySUQ9aHR0cHMlM0ElMkYlMkZlbWVhMS5wcm94eS5jcC50aG9tc29ucmV1dGVycy5jb20lM0E0NDMlMkZhbWFnZW50Jklzc3VlSW5zdGFudD0yMDIxLTAxLTA3VDEyJTNBNTYlM0EyNFomTWFqb3JWZXJzaW9uPTE="/><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>
Traceback (most recent call last):

  File "<ipython-input-6-80f295b13dac>", line 1, in <module>
    loop_screen, error =ek.get_data(each_request,fields)

  File "C:\Users\florian\AppData\Local\Continuum\anaconda3\lib\site-packages\eikon\data_grid.py", line 198, in get_data
    return get_data_frame(result, field_name)

  File "C:\Users\florian\AppData\Local\Continuum\anaconda3\lib\site-packages\eikon\data_grid.py", line 247, in get_data_frame
    headers = [header['displayName'] for header in data_dict['headers'][0]]

KeyError: 'headers'

I would be happy for your help!

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonscreenerspyder
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
47.2k 110 44 60

@FRZH

The returned response looks like to be a login page.

I got the same response when I used the same Eikon account on another application while running the application. For example, I used my Eikon account to access API docs (https://api.refinitiv.com/) while running the code.

Please make sure that the Eikon account is not shared with other applications.


1611723731103.png (26.4 KiB)
1611723866920.png (98.5 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
18k 21 12 20

Hi @FRZH

I am using Python 3.9.1 and Eikon Data API 1.1.8

Your code works fine for me.


ahs.png (29.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.

I am using Python 3.7.4 and Eikon Data API 1.1.8

Upvotes
12 4 1 3

I am using Python 3.7.4 and Eikon Data API 1.1.8


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.3k 76 11 27

@FRZH

Do you consistently receive this error for all requests? Are you able to execute any requests at all? How about simple

ek.get_data ('IBM.N', ['TR.ISIN','TR.ExchangeCountryCode'])
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
12 4 1 3

Sometimes the request works and sometimes I get the same error message


ek.get_data ('IBM.N', ['TR.ISIN','TR.ExchangeCountryCode'])
2021-01-19 11:18:01,927 P[6424] [MainThread 12532] Failed to decode response to json: <!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
</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=83D120FBC230495DC3E7731B598C9B70C0403BEBFC7513BEFFFCC3F80E67A89D&theme=charcoal&ProviderID=https%3A%2F%2Femea1.proxy.cp.thomsonreuters.com%3A443%2Famagent&IssueInstant=2021-01-19T10%3A18%3A01Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Femea1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253D4a050b94-8d55-2247-a22e-9f237494bd00%2526srv%253DDTCP-ERPCPRP08%26MinorVersion%3D0%26RequestID%3D83D120FBC230495DC3E7731B598C9B70C0403BEBFC7513BEFFFCC3F80E67A89D%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Femea1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-01-19T10%253A18%253A01Z%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=83D120FBC230495DC3E7731B598C9B70C0403BEBFC7513BEFFFCC3F80E67A89D&theme=charcoal&ProviderID=https%3A%2F%2Femea1.proxy.cp.thomsonreuters.com%3A443%2Famagent&IssueInstant=2021-01-19T10%3A18%3A01Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Femea1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253D4a050b94-8d55-2247-a22e-9f237494bd00%2526srv%253DDTCP-ERPCPRP08%26MinorVersion%3D0%26RequestID%3D83D120FBC230495DC3E7731B598C9B70C0403BEBFC7513BEFFFCC3F80E67A89D%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Femea1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-01-19T10%253A18%253A01Z%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=83D120FBC230495DC3E7731B598C9B70C0403BEBFC7513BEFFFCC3F80E67A89D&theme=charcoal&ProviderID=https%3A%2F%2Femea1.proxy.cp.thomsonreuters.com%3A443%2Famagent&IssueInstant=2021-01-19T10%3A18%3A01Z&MajorVersion=1&goto=%2Fauth%2Fcdcservlet%3FTARGET%3Dhttps%253A%252F%252Femea1.apps.cp.thomsonreuters.com%252FApps%252FUDF%252FMSF%253Fampostpreserve%253D4a050b94-8d55-2247-a22e-9f237494bd00%2526srv%253DDTCP-ERPCPRP08%26MinorVersion%3D0%26RequestID%3D83D120FBC230495DC3E7731B598C9B70C0403BEBFC7513BEFFFCC3F80E67A89D%26theme%3Dcharcoal%26ProviderID%3Dhttps%253A%252F%252Femea1.proxy.cp.thomsonreuters.com%253A443%252Famagent%26IssueInstant%3D2021-01-19T10%253A18%253A01Z%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="L2F1dGgvY2Rjc2VydmxldD9UQVJHRVQ9aHR0cHMlM0ElMkYlMkZlbWVhMS5hcHBzLmNwLnRob21zb25yZXV0ZXJzLmNvbSUyRkFwcHMlMkZVREYlMkZNU0YlM0ZhbXBvc3RwcmVzZXJ2ZSUzRDRhMDUwYjk0LThkNTUtMjI0Ny1hMjJlLTlmMjM3NDk0YmQwMCUyNnNydiUzRERUQ1AtRVJQQ1BSUDA4Jk1pbm9yVmVyc2lvbj0wJlJlcXVlc3RJRD04M0QxMjBGQkMyMzA0OTVEQzNFNzczMUI1OThDOUI3MEMwNDAzQkVCRkM3NTEzQkVGRkZDQzNGODBFNjdBODlEJnRoZW1lPWNoYXJjb2FsJlByb3ZpZGVySUQ9aHR0cHMlM0ElMkYlMkZlbWVhMS5wcm94eS5jcC50aG9tc29ucmV1dGVycy5jb20lM0E0NDMlMkZhbWFnZW50Jklzc3VlSW5zdGFudD0yMDIxLTAxLTE5VDEwJTNBMTglM0EwMVomTWFqb3JWZXJzaW9uPTE="/><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>
Traceback (most recent call last):

  File "<ipython-input-2-d4b11ba69db7>", line 1, in <module>
    ek.get_data ('IBM.N', ['TR.ISIN','TR.ExchangeCountryCode'])

  File "C:\Users\florian\Anaconda3\Lib\site-packages\eikon\data_grid.py", line 198, in get_data
    return get_data_frame(result, field_name)

  File "C:\Users\florian\Anaconda3\Lib\site-packages\eikon\data_grid.py", line 247, in get_data_frame
    headers = [header['displayName'] for header in data_dict['headers'][0]]

KeyError: 'headers'
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.3k 76 11 27

@FRZH

The error indicates that the response from the backend comes in empty, which is unexpected and requires troubleshooting. It would be extremely helpful if you could create a Fiddler capture for the failed simple request like ek.get_data ('IBM.N', ['TR.ISIN','TR.ExchangeCountryCode']). The request would go to "https://emea1.apps.cp.thomsonreuters.com/Apps/UDF/MSF" endpoint. Would you be able to do this? If you're unable to get Fiddler capture, the next best thing would be Eikon API Proxy log file created with the Debug trace level. Chapter 3 "Verify that Eikon Desktop is running properly and APIPROXY service is enabled" in this article contains instructions for enabling logging in Eikon application. The specific log file we're interested in is APIProxy.YYYYMMDD.HHMMSS000.pXXXX.txt. Don't forget to disable logging once you grabbed the log file. Logging at Debug trace level is very resource intensive and should only be enabled while troubleshooting.

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
12 4 1 3

Attached please find the log file APIProxy.20210126.085213000.p13608.txt


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.

Thanks for the log. As far as I can see all the requests captured in the log returned data payload as expected. Unfortunately I can only go by the size of the payload, as the log (unlike the Fiddler capture) only records the size of the payload and not the data in it. But the size of the payload recorded in the log is consistent with the data being returned as expected. Did you experience the error during this test? Can you recall which specific request returned the error? If you have a chance of getting a Fiddler capture for the request that returns the error, that would be enormously helpful.