Timeout access Eikon API from Phyton
API status works from web browser (http://localhost:9000/ping?all and http://localhost:9060/api/status)
Running sample code returns timeout error.
Code:
import eikon as ek
ek.set_log_level(1)
ek.set_app_key('<app key here>')
df,e = ek.get_data('REUTERS','TR.RIC')
Output:
[2022-10-27 11:06:11,797;s] - [INFO] - [log] - Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...
[2022-10-27 11:06:11,805;s] - [DEBUG] - [log] - Request to http://127.0.0.1:9060/api/status
headers = {'x-tr-applicationid': '76a0963f007e46e3bf57b1ed35379e76e1e9c5df'}
params = None
[2022-10-27 11:06:26,955;s] - [Level 1] - [log] - TimeoutException on HTTP request: ReadTimeout('')
[2022-10-27 11:06:26,956;s] - [DEBUG] - [log] - Error on checking proxy url http://127.0.0.1:9060/api/status : ReadTimeout('')
[2022-10-27 11:06:26,957;s] - [INFO] - [log] - Retrieved port 9060 value from .portIntUse isn't valid.
[2022-10-27 11:06:26,958;s] - [INFO] - [log] - Warning: file .portInUse was not found. Try to fallback to default port number.
[2022-10-27 11:06:26,958;s] - [INFO] - [log] - Try defaulting to port 9000...
[2022-10-27 11:06:26,959;s] - [INFO] - [log] - Send GET request to http://127.0.0.1:9000/api/status to detect API Proxy...
[2022-10-27 11:06:26,959;s] - [DEBUG] - [log] - Request to http://127.0.0.1:9000/api/status
headers = {'x-tr-applicationid': '76a0963f007e46e3bf57b1ed35379e76e1e9c5df'}
params = None
[2022-10-27 11:06:41,995;s] - [Level 1] - [log] - TimeoutException on HTTP request: ReadTimeout('')
[2022-10-27 11:06:41,996;s] - [DEBUG] - [log] - Error on checking proxy url http://127.0.0.1:9000/api/status : ReadTimeout('')
[2022-10-27 11:06:41,997;s] - [DEBUG] - [log] - Default proxy port #9000 failed
[2022-10-27 11:06:41,997;s] - [INFO] - [log] - Try defaulting to port 9060...
[2022-10-27 11:06:41,998;s] - [INFO] - [log] - Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...
[2022-10-27 11:06:41,999;s] - [DEBUG] - [log] - Request to http://127.0.0.1:9060/api/status
headers = {'x-tr-applicationid': '76a0963f007e46e3bf57b1ed35379e76e1e9c5df'}
params = None
[2022-10-27 11:06:57,017;s] - [Level 1] - [log] - TimeoutException on HTTP request: ReadTimeout('')
[2022-10-27 11:06:57,017;s] - [DEBUG] - [log] - Error on checking proxy url http://127.0.0.1:9060/api/status : ReadTimeout('')
[2022-10-27 11:06:57,019;s] - [DEBUG] - [log] - Default proxy port #9060 failed
[2022-10-27 11:06:57,020;s] - [ERROR] - [log] - Error: no proxy address identified.