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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 0 1 0

ek.get_timeseries does not respond

Hi!

After successfully connecting to Eikon calling ek.set_app_key (at least I guess so as there is no error message), calling the function ek.get_timeseries results in no response at all (i.e. also no error message; function just not stopped) even after more than 10 minutes. Find below my Phyton version as well as the code I am using.

Is there a way to check what exactly goes wrong?

Best regards,

Peter

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonerror
python-test.jpg (59.6 KiB)
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
4.3k 2 4 5

This output reveals that a proxy is redirecting all requests.
This could cause trouble in Eikon API Proxy.

To get more info from Eikon Desktop, could you configure logs to debug (with Eikon Configuration Manager tool) then check APIProxy.<yyyymmdd>.<hhmmsssss>.txt in log firectory ?
(default is C:\ProgramData\Thomson Reuters\Eikon Data\Logs\TRD\Eikon.<yyyymmdd>.<hhmmss>.p<pid>)

Check :

  • the version in the first line (ex: "-Context=C:\Users\xxxxxx\AppData\Local\Thomson Reuters\Eikon User\Cache\LibraryCache\Apps\REFINITIVHOLDINGS.EIKON.DATAAPIPROXY\1.1.0.12")
  • last lines that should refer to your ek.getimeseries() request


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.

Hi again! Many thanks for these next steps, much appreciated! I am not sure if I understood correctly. I found the log file (see attachment: APIProxy.20201117.120740000.p129212.txt) but do not know if it contains the relevant information as I could not perform the configuration you mentioned initially. Is there maybe a step-by-step description for the not-so-advanced user how to do this?

That's the log file we need to progress in investigations, but it's almost empty because log level is not defined.

Now, you just have to configure log level to debug.
To do this, follow this Troubleshooting page ,
section 3. Verify that Eikon Desktop is running properly and APIPROXY service is enabled.

Then, you can restart Eikon Desktop and execute your python code.
APIProxy log should contain more information.

Many thanks for the instructions how to configure log level to debug! New APIProxy-log file attached (APIProxy.20201117.150831000.p26020.txt). Is there any indication in that file on what could be wrong?

Show more comments
Upvotes
4.3k 2 4 5

Hi,

Could you activate log to get more detail ?
(add ek.set_log_level(1) before ek.get_timeseries(...))

If you have a 1.1.6+ version of eikon, you can also set HTTPX_LOG_LEVEL env variable to trace before launching python ( c:>set HTTPX_LOG_LEVEL=trace )

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.

Hi Pierre,

many thanks for your relpy! I followed both your recommendations and now get a rather long output which I am not able to propely interpret (see attachment)python output.txt... Are you getting any relevant information out of it?

Kind regards,

Peter

python-output.txt (12.2 KiB)
Upvotes
16 0 1 0

Hi Pierre,

many thanks for your relpy! I followed both your recommendations and now get the long output below which I am not able to propely interpret... Are you getting any relevant information out of it?

Kind regards,

Peter


C:\95 Python>set HTTPX_LOG_LEVEL=trace


C:\95 Python>python

Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import eikon as ek

>>> ek.set_app_key('XXXXXXXX')

TRACE [2020-11-16 14:59:22] httpx._config - load_ssl_context verify=True cert=None trust_env=True http2=False

2020-11-16 14:59:22,601 P[36268] [MainThread 98088] load_ssl_context verify=True cert=None trust_env=True http2=False

TRACE [2020-11-16 14:59:22] httpx._config - load_verify_locations cafile=C:\Users\PETER61\AppData\Local\Programs\Python\Python39\lib\site-packages\certifi\cacert.pem

2020-11-16 14:59:22,601 P[36268] [MainThread 98088] load_verify_locations cafile=C:\Users\PETER61\AppData\Local\Programs\Python\Python39\lib\site-packages\certifi\cacert.pem

TRACE [2020-11-16 14:59:22] httpx._config - load_ssl_context verify=True cert=None trust_env=True http2=False

2020-11-16 14:59:22,628 P[36268] [MainThread 98088] load_ssl_context verify=True cert=None trust_env=True http2=False

TRACE [2020-11-16 14:59:22] httpx._config - load_verify_locations cafile=C:\Users\PETER61\AppData\Local\Programs\Python\Python39\lib\site-packages\certifi\cacert.pem

2020-11-16 14:59:22,628 P[36268] [MainThread 98088] load_verify_locations cafile=C:\Users\PETER61\AppData\Local\Programs\Python\Python39\lib\site-packages\certifi\cacert.pem

TRACE [2020-11-16 14:59:22] httpx._config - load_ssl_context verify=True cert=None trust_env=True http2=False

2020-11-16 14:59:22,639 P[36268] [MainThread 98088] load_ssl_context verify=True cert=None trust_env=True http2=False

TRACE [2020-11-16 14:59:22] httpx._config - load_verify_locations cafile=C:\Users\PETER61\AppData\Local\Programs\Python\Python39\lib\site-packages\certifi\cacert.pem

2020-11-16 14:59:22,640 P[36268] [MainThread 98088] load_verify_locations cafile=C:\Users\PETER61\AppData\Local\Programs\Python\Python39\lib\site-packages\certifi\cacert.pem

TRACE [2020-11-16 14:59:22] httpcore._async.http_proxy - forward_request proxy_origin=(b'http', b'www-proxy.omv.com', 8080) proxy_headers=[] method=b'GET' url=(b'http', b'127.0.0.1', 9060, b'/api/status')

2020-11-16 14:59:22,651 P[36268] [MainThread 98088] forward_request proxy_origin=(b'http', b'www-proxy.omv.com', 8080) proxy_headers=[] method=b'GET' url=(b'http', b'127.0.0.1', 9060, b'/api/status')

TRACE [2020-11-16 14:59:22] httpcore._async.connection_pool - adding connection to pool=<AsyncHTTPConnection http_version=UNKNOWN state=0>

2020-11-16 14:59:22,651 P[36268] [MainThread 98088] adding connection to pool=<AsyncHTTPConnection http_version=UNKNOWN state=0>

TRACE [2020-11-16 14:59:22] httpcore._async.connection - open_socket origin=(b'http', b'www-proxy.omv.com', 8080) timeout={'connect': 15.0, 'read': 15.0, 'write': None, 'pool': None}

2020-11-16 14:59:22,651 P[36268] [MainThread 98088] open_socket origin=(b'http', b'www-proxy.omv.com', 8080) timeout={'connect': 15.0, 'read': 15.0, 'write': None, 'pool': None}

TRACE [2020-11-16 14:59:32] httpcore._async.connection - create_connection socket=<httpcore._backends.asyncio.SocketStream object at 0x00000238F0B2D0D0> http_version='HTTP/1.1'

2020-11-16 14:59:32,696 P[36268] [MainThread 98088] create_connection socket=<httpcore._backends.asyncio.SocketStream object at 0x00000238F0B2D0D0> http_version='HTTP/1.1'

TRACE [2020-11-16 14:59:32] httpcore._async.connection - connection.request method=b'GET' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/status') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'x-tr-applicationid', b'XXXXXXXX')]

2020-11-16 14:59:32,727 P[36268] [MainThread 98088] connection.request method=b'GET' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/status') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'x-tr-applicationid', b'XXXXXXXX')]

TRACE [2020-11-16 14:59:32] httpcore._async.http11 - send_request method=b'GET' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/status') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'x-tr-applicationid', b'XXXXXXXX')]

2020-11-16 14:59:32,729 P[36268] [MainThread 98088] send_request method=b'GET' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/status') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'x-tr-applicationid', b'XXXXXXXX')]

TRACE [2020-11-16 14:59:32] httpcore._async.http11 - send_data=Data(<0 bytes>)

2020-11-16 14:59:32,735 P[36268] [MainThread 98088] send_data=Data(<0 bytes>)

DEBUG [2020-11-16 14:59:32] httpx._client - HTTP Request: GET http://127.0.0.1:9060/api/status "HTTP/1.1 301 Moved Permanently"

2020-11-16 14:59:32,756 P[36268] [MainThread 98088] HTTP Request: GET http://127.0.0.1:9060/api/status "HTTP/1.1 301 Moved Permanently"

TRACE [2020-11-16 14:59:32] httpcore._async.http11 - receive_event=Data(<81 bytes>)

2020-11-16 14:59:32,775 P[36268] [MainThread 98088] receive_event=Data(<81 bytes>)

TRACE [2020-11-16 14:59:32] httpcore._async.http11 - receive_event=EndOfMessage(headers=[])

2020-11-16 14:59:32,795 P[36268] [MainThread 98088] receive_event=EndOfMessage(headers=[])

TRACE [2020-11-16 14:59:32] httpcore._async.http11 - response_closed our_state=MUST_CLOSE their_state=MUST_CLOSE

2020-11-16 14:59:32,803 P[36268] [MainThread 98088] response_closed our_state=MUST_CLOSE their_state=MUST_CLOSE

TRACE [2020-11-16 14:59:32] httpcore._async.connection_pool - removing connection from pool=<AsyncHTTPConnection http_version=HTTP/1.1 state=5>

2020-11-16 14:59:32,805 P[36268] [MainThread 98088] removing connection from pool=<AsyncHTTPConnection http_version=HTTP/1.1 state=5>

TRACE [2020-11-16 14:59:32] httpcore._async.http_proxy - forward_request proxy_origin=(b'http', b'www-proxy.omv.com', 8080) proxy_headers=[] method=b'POST' url=(b'http', b'127.0.0.1', 9060, b'/api/handshake')

2020-11-16 14:59:32,806 P[36268] [MainThread 98088] forward_request proxy_origin=(b'http', b'www-proxy.omv.com', 8080) proxy_headers=[] method=b'POST' url=(b'http', b'127.0.0.1', 9060, b'/api/handshake')

TRACE [2020-11-16 14:59:32] httpcore._async.connection_pool - adding connection to pool=<AsyncHTTPConnection http_version=UNKNOWN state=0>

2020-11-16 14:59:32,806 P[36268] [MainThread 98088] adding connection to pool=<AsyncHTTPConnection http_version=UNKNOWN state=0>

TRACE [2020-11-16 14:59:32] httpcore._async.connection - open_socket origin=(b'http', b'www-proxy.omv.com', 8080) timeout={'connect': 15.0, 'read': 15.0, 'write': None, 'pool': None}

2020-11-16 14:59:32,822 P[36268] [MainThread 98088] open_socket origin=(b'http', b'www-proxy.omv.com', 8080) timeout={'connect': 15.0, 'read': 15.0, 'write': None, 'pool': None}

TRACE [2020-11-16 14:59:42] httpcore._async.connection - create_connection socket=<httpcore._backends.asyncio.SocketStream object at 0x00000238F0B7CDF0> http_version='HTTP/1.1'

2020-11-16 14:59:42,855 P[36268] [MainThread 98088] create_connection socket=<httpcore._backends.asyncio.SocketStream object at 0x00000238F0B7CDF0> http_version='HTTP/1.1'

TRACE [2020-11-16 15:00:36] httpcore._async.connection - connection.request method=b'POST' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/handshake') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'content-type', b'application/json'), (b'x-tr-applicationid', b'XXXXXXXX'), (b'content-length', b'159')]

2020-11-16 15:00:36,213 P[36268] [MainThread 98088] connection.request method=b'POST' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/handshake') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'content-type', b'application/json'), (b'x-tr-applicationid', b'XXXXXXXX'), (b'content-length', b'159')]

TRACE [2020-11-16 15:00:36] httpcore._async.http11 - send_request method=b'POST' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/handshake') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'content-type', b'application/json'), (b'x-tr-applicationid', b'XXXXXXXX'), (b'content-length', b'159')]

2020-11-16 15:00:36,213 P[36268] [MainThread 98088] send_request method=b'POST' url=(b'http', b'www-proxy.omv.com', 8080, b'http://127.0.0.1:9060/api/handshake') headers=[(b'host', b'127.0.0.1:9060'), (b'user-agent', b'python-httpx/0.14.3'), (b'accept', b'*/*'), (b'accept-encoding', b'gzip, deflate'), (b'connection', b'keep-alive'), (b'content-type', b'application/json'), (b'x-tr-applicationid', b'XXXXXXXX'), (b'content-length', b'159')]

TRACE [2020-11-16 15:00:36] httpcore._async.http11 - send_data=Data(<159 bytes>)

2020-11-16 15:00:36,214 P[36268] [MainThread 98088] send_data=Data(<159 bytes>)

DEBUG [2020-11-16 15:00:36] httpx._client - HTTP Request: POST http://127.0.0.1:9060/api/handshake "HTTP/1.1 301 Moved Permanently"

2020-11-16 15:00:36,336 P[36268] [MainThread 98088] HTTP Request: POST http://127.0.0.1:9060/api/handshake "HTTP/1.1 301 Moved Permanently"

TRACE [2020-11-16 15:00:36] httpcore._async.http11 - receive_event=Data(<81 bytes>)

2020-11-16 15:00:36,340 P[36268] [MainThread 98088] receive_event=Data(<81 bytes>)

TRACE [2020-11-16 15:00:36] httpcore._async.http11 - receive_event=EndOfMessage(headers=[])

2020-11-16 15:00:36,345 P[36268] [MainThread 98088] receive_event=EndOfMessage(headers=[])

TRACE [2020-11-16 15:00:36] httpcore._async.http11 - response_closed our_state=MUST_CLOSE their_state=MUST_CLOSE

2020-11-16 15:00:36,346 P[36268] [MainThread 98088] response_closed our_state=MUST_CLOSE their_state=MUST_CLOSE

TRACE [2020-11-16 15:00:36] httpcore._async.connection_pool - removing connection from pool=<AsyncHTTPConnection http_version=HTTP/1.1 state=5>

2020-11-16 15:00:36,346 P[36268] [MainThread 98088] removing connection from pool=<AsyncHTTPConnection http_version=HTTP/1.1 state=5>

>>> ek.set_log_level(1)

>>> df = ek.get_timeseries(["MSFT.O"],start_date="2016-01-01",end_date="2016-01-10")

2020-11-16 15:00:51,779 P[36268] [MainThread 98088] entity: TimeSeries

2020-11-16 15:00:51,784 P[36268] [MainThread 98088] payload: {'rics': ['MSFT.O'], 'fields': ['*'], 'interval': 'daily', 'startdate': '2016-01-01T00:00:00', 'enddate': '2016-01-10T00:00:00'}

2020-11-16 15:00:51,794 P[36268] [MainThread 98088] Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['MSFT.O'], 'fields': ['*'], 'interval': 'daily', 'startdate': '2016-01-01T00:00:00', 'enddate': '2016-01-10T00:00:00'}}}

2020-11-16 15:00:51,800 P[36268] [MainThread 98088] Request to http://127.0.0.1:9060/api/v1/data

headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'XXXXXXXX'}

params = None

TRACE [2020-11-16 15:00:51] httpcore._async.http_proxy - forward_request proxy_origin=(b'http', b'www-proxy.omv.com', 8080) proxy_headers=[] method=b'POST' url=(b'http', b'127.0.0.1', 9060, b'/api/v1/data')

2020-11-16 15:00:51,804 P[36268] [MainThread 98088] forward_request proxy_origin=(b'http', b'www-proxy.omv.com', 8080) proxy_headers=[] method=b'POST' url=(b'http', b'127.0.0.1', 9060, b'/api/v1/data')

TRACE [2020-11-16 15:00:51] httpcore._async.connection_pool - adding connection to pool=<AsyncHTTPConnection http_version=UNKNOWN state=0>

2020-11-16 15:00:51,804 P[36268] [MainThread 98088] adding connection to pool=<AsyncHTTPConnection http_version=UNKNOWN state=0>

TRACE [2020-11-16 15:00:51] httpcore._async.connection - open_socket origin=(b'http', b'www-proxy.omv.com', 8080) timeout={'connect': None, 'read': None, 'write': None, 'pool': None}

2020-11-16 15:00:51,804 P[36268] [MainThread 98088] open_socket origin=(b'http', b'www-proxy.omv.com', 8080) timeout={'connect': None, 'read': None, 'write': None, 'pool': None}


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