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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
4 0 0 1

How to connect to Eikon via python from MS power-bi?

Hi,


I am trying to connect to Eikon via python from MS power-bi.


Power bi has a connector for python. If I use following script (which works in jupyter):


import eikon as ek

import pandas as dp

ek.set_app_key('########################################')

df, err = ek.get_data(['PEUP.PA','EUR=','JPY='], ['BID','ASK'])

df


power-bi gives following error message:


Details: "ADO.NET: Python script error.

Traceback (most recent call last):

File "PythonScriptWrapper.PY", line 10, in <module>

import eikon as dp

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\eikon\__init__.py", line 12, in <module>

from .Profile import *

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\eikon\Profile.py", line 17, in <module>

from .streaming_session import DesktopSession

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\eikon\streaming_session\__init__.py", line 3, in <module>

from .session import *

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\eikon\streaming_session\session.py", line 8, in <module>

import httpx

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\httpx\__init__.py", line 2, in <module>

from ._api import delete, get, head, options, patch, post, put, request, stream

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\httpx\_api.py", line 3, in <module>

from ._client import Client, StreamContextManager

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\httpx\_client.py", line 5, in <module>

import httpcore

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\httpcore\__init__.py", line 2, in <module>

from ._async.connection_pool import AsyncConnectionPool

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\site-packages\httpcore\_async\connection_pool.py", line 2, in <module>

from ssl import SSLContext

File "C:\Users\ \Anaconda3\envs\refinitiv\lib\ssl.py", line 98, in <module>

import _ssl # if we can't import it, let the error propagate

ImportError: DLL load failed while importing _ssl: Das angegebene Modul wurde nicht gefunden.

"


Why is it not working?

Many thanks in advance


Ludwig

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.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

@calice.l

This error is not related to any Refinitiv software. To verify, you can replace your code with a single line

import _ssl

My expectation is that with the above line of code you will reproduce the same error. Or more precisely the last part of it: "ImportError: DLL load failed while importing _ssl: Das angegebene Modul wurde nicht gefunden".

The error is related to the setup of your Python environment. There may be numerous reasons for the root cause. Here's a link to a thread on Stackoverflow, which may be useful.

https://stackoverflow.com/questions/54175042/python-3-7-anaconda-environment-import-ssl-dll-load-fail-error

The reason why it works in Jupyter and not in Power BI must be that your Jupyter and Power BI utilize different Python environments.

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 Alex,

thanks a million! Copying

-   libcrypto-1_1-x64.dll 
-   libssl-1_1-x64.dll 

into respective envs DLLs worked!

Ludwig


Click below to post an Idea Post Idea