Hi @rayr.hou ,
I can run it properly on both Python in the Command Prompt and using Jupyter Notebook, would you mind retry running the code again? and then maybe try to print the df again after your current code is executed.
Please tell me in case the issue still persist, I'll try to do the further investigation.
Please try the following:
import eikon as ek import logging ek.set_app_key('your app key') ek.set_log_level(logging.DEBUG) ek.__version__ df=ek.get_timeseries('MSFT.O',start_date='2016-01-01',end_date= '2016-01-10',raw_output=True) print(df)
And then paste the output here - excluding the x-tr-applicationid value and 'Authorization': 'Bearer ....' data - do not include those as they are confidential.
If you see no further output beyond what you have posted above, it would indicate you are not getting any response from the Eikon API Proxy
Please try the following in a browser and see what response you get for each:
If you can clear the Cache on Eikon and restart Eikon to see if that helps - you can find the Clear Cache option in your Window Start menu under Thomson Reuters / Refinitiv -> Eikon Tools.
I would also recommend you upgrade to the later Eikon library
pip install eikon==1.1.12
and also change the earlier code snippet order
import eikon as ek ek.set_log_level(1) ek.set_app_key('your app key') ek.__version__ df=ek.get_timeseries('MSFT.O',start_date='2016-01-01',end_date= '2016-01-10') print(df)
Thanks for getting back with the above details.
Based on the error message, this is the same scenario as reported and diagnosed prevoiusly in Trying to execute code from CODEBOOK to a python file, ERROR "Your request is prohibited because the request is on loopback from external IP." - Forum | Refinitiv Developer Community
As explained by my colleague @Alex Putkov. in the above post,
What's happening is that, even though the HTTP request is directed to the localhost, your HTTP proxy intercepts it. After intercepting the request the proxy returns the request to your machine, but now to Eikon API Proxy the request appears as coming from a remote machine (as it comes from the IP address of the HTTP proxy). Eikon API Proxy rejects the request with the error message that you've seen because it only allows the requests coming from the same machine.
Therefore, you will need to speak to your internal network team/security team to configure your proxy settings to allow HTTP requests directed to the localhost to not be intercepted by your HTTP proxy.
If they need assistance with doing this, I recommend they contact the Refinitiv Eikon Helpdesk - which can be done directly from within Eikon OR via My.Refinitiv