Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 2 3

Download Data from Eikon Issue

Hi,


How to fix this problem? The error message is showing below.


Traceback (most recent call last):

File "C:\Cloud\Box\Sprott Asset$\SAM Performance and Analytics\Risk\Applications\Python\RAW_Daily_imports.py", line 72, in dailyimport

all_data['Benchmark']=benchimport(fi('5,12',filedate,db=db),filedate, justdata,db=db)

File "C:\Cloud\Box\Sprott Asset$\SAM Performance and Analytics\Risk\Applications\Python\Dataimport.py", line 105, in file_importer

file_dict[fn]=data['TimeSeries']

TypeError: 'NoneType' object is not subscriptable

CRITICAL:root:critical

DEBUG:pyeikon:Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['.SPXTR'}}}

DEBUG:pyeikon:Request to http://127.0.0.1:None/api/v1/data

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

params = None

DEBUG:pyeikon:HTTP Error: Request URL is missing an 'http://' or 'https://' protocol.

ERROR:pyeikon:Eikon Proxy not running or cannot be reached. Please read the documentation on troubleshooting

ERROR:Eikon_TimeSeries:error

Traceback (most recent call last):

File "C:\Cloud\Box\Sprott Asset$\SAM Performance and Analytics\Risk\Applications\Python\Eikon_TimeSeries.py", line 41, in eikon_ts

data = ek.get_timeseries(rics,

File "C:\ProgramData\Anaconda3\lib\site-packages\eikon\time_series.py", line 182, in get_timeseries

ts_result = eikon.json_requests.send_json_request(TimeSeries_UDF_endpoint, payload, debug=debug)

File "C:\ProgramData\Anaconda3\lib\site-packages\eikon\json_requests.py", line 149, in send_json_request

raise EikonError(401, error_msg)

eikon.eikonError.EikonError: Error code 401 | Eikon Proxy not running or cannot be reached. Please read the documentation on troubleshooting

ERROR:pyeikon:Eikon error

Traceback (most recent call last):

File "C:\Cloud\Box\Sprott Asset$\SAM Performance and Analytics\Risk\Applications\Python\Eikon_TimeSeries.py", line 41, in eikon_ts

data = ek.get_timeseries(rics,

File "C:\ProgramData\Anaconda3\lib\site-packages\eikon\time_series.py", line 182, in get_timeseries

ts_result = eikon.json_requests.send_json_request(TimeSeries_UDF_endpoint, payload, debug=debug)

File "C:\ProgramData\Anaconda3\lib\site-packages\eikon\json_requests.py", line 149, in send_json_request

raise EikonError(401, error_msg)

eikon.eikonError.EikonError: Error code 401 | Eikon Proxy not running or cannot be reached. Please read the documentation on troubleshooting

ERROR:root:error

Traceback (most recent call last):

File "C:\Cloud\Box\Sprott Asset$\SAM Performance and Analytics\Risk\Applications\Python\RAW_Daily_imports.py", line 72, in dailyimport

all_data['Benchmark']=benchimport(fi('5,12',filedate,db=db),filedate, justdata,db=db)

File "C:\Cloud\Box\Sprott Asset$\SAM Performance and Analytics\Risk\Applications\Python\Dataimport.py", line 105, in file_importer

file_dict[fn]=data['TimeSeries']

TypeError: 'NoneType' object is not subscriptable

CRITICAL:root:critical

eikoneikon-data-apidata
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.

Hello @clli ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
78.9k 250 52 74

@clli

First, we need to check if the Eikon API proxy is running properly by accessing the following URLs via a web browser.

The output looks like this:

1640058728185.png

Next, you need to set up a new virtual environment in Conda. Then, install the Eikon library in that environment and run the simple code to verify what the problem is.

import eikon as ek
ek.set_log_level(1)
ek.set_app_key('<app key>')
ek.get_timeseries("IBM.N")
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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.