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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
1 0 0 0

ek.get_data error ‘’nonetype" object has no attribute 'http_requrest'

I can't get data from eikon using eikon api. I have an app key but continue to get error: ‘’nonetype" object has no attribute 'http_requrest' when I use ek.get_data in python.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
4.3k 2 4 5

Hi,

Issue can be reproduced when ek.set_app_key("xxxxxxxxxxxxxxxxxxxxxx") was not called.

Could you confirm that ek.set_app_key() was called without any error ?

In addition, could you detail the version of eikon lib and your request (get_data parameters) ?


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

my set_app_key runs normally so my key should be no problem. im using the website version of eikon on mac.

im copying a sample/ model request from refinitiv tutorial

data, error = ek.get_data(["GE", "IBM"], ["BID", "ASK"])

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.

Ok,

Could you :

  1. open http://localhost:9000/api/status
    you should have something like {"statusCode":"ST_PROXY_READY","version":"2.6.3"}
  2. detail the version of eikon lib you're using (check ek.__version__)
    (last version is 1.1.6.post3)
  3. activate logs (add ek.set_log_level(1) before ek.set_app_key() )
  4. then run your code and share output (remove all personal data, specifically app_key | application_id | x-tr-applicationid in request headers)


Upvotes
17 0 0 0
Hello @pierre.faurel, I am experiencing the same issue Internal Server Error 500 after I run the query that used to run perfectly fine before. Please see the detailed log. And yes, I can set the app key without any errors. and the 9000/api/status message is as expected. version 2.6.4. and the eikon version is the last.
2020-12-07 15:02:25,941 P[12944] [MainThread 17968] entity: DataGrid_StandardAsync 

2020-12-07 15:02:25,942 P[12944] [MainThread 17968] payload: {'requests': [{'instruments': ['SCREEN(U(IN(Equity(active,public,private,primary))), Contains(TR.BusinessSummary,"islami") OR Contains(TR.BusinessSummary,"takaful") OR Contains(TR.CommonName,"takaful") OR Contains(TR.CommonName,"islami") OR Contains(TR.BusinessSummary,"sharia"), IN(TR.TRBCIndustryCode,55301050,55301030,55301020,55301010), CURN=USD)'], 'fields': [{'name': 'TR.TRBCIndustry'}]}]} 

2020-12-07 15:02:25,943 P[12944] [MainThread 17968] Request:{'Entity': {'E': 'DataGrid_StandardAsync', 'W': {'requests': [{'instruments': ['SCREEN(U(IN(Equity(active,public,private,primary))), Contains(TR.BusinessSummary,"islami") OR Contains(TR.BusinessSummary,"takaful") OR Contains(TR.CommonName,"takaful") OR Contains(TR.CommonName,"islami") OR Contains(TR.BusinessSummary,"sharia"), IN(TR.TRBCIndustryCode,55301050,55301030,55301020,55301010), CURN=USD)'], 'fields': [{'name': 'TR.TRBCIndustry'}]}]}}} 

2020-12-07 15:02:25,944 P[12944] [MainThread 17968] Request to http://127.0.0.1:9060/api/v1/data    headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'xxxxxxxxxxxx'}     params = None 

2020-12-07 15:02:26,101 P[12944] [MainThread 17968] HTTP request response 500: {"code":500,"message":"read ECONNRESET","statusMessage":"Internal Server Error"} 

2020-12-07 15:02:26,102 P[12944] [MainThread 17968] HTTP Response code: 500 

2020-12-07 15:02:26,102 P[12944] [MainThread 17968] HTTP Response: {"code":500,"message":"read ECONNRESET","statusMessage":"Internal Server Error"} 

2020-12-07 15:02:26,103 P[12944] [MainThread 17968] Headers: x_ratelimit_limit=None / x_ratelimit_remaining=None 

2020-12-07 15:02:26,104 P[12944] [MainThread 17968]          x_volumelimit_limit=None / x_volumelimit_remaining=None 

2020-12-07 15:02:26,112 P[12944] [MainThread 17968]          retry_after 0
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