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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
31 0 1 3

Python/Eikon API - Proxy Not Loading

I am trying to use the Eikon module in Python.

When i attempt to import Eikon, python displays the following errors:

Warning: file .portInUse was not found. Is Eikon Scripting Proxy running? Defaulting to port 36036

EikonError: 'Error code 401 | Eikon Proxy not installed or not running. Please read the documentation to know how to install and run the proxy. '

i am running the latest version of Eikon (4.0.42), and I can see "Proxy" in apps under the Eikon_> About section.

Can anyone help with this?

Thanks

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonapiproxy
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.

@jdog88, according to the product management, the issue will be resolved permanently in the new version of eikon py this week .

For now, try overriding default port finding routine with this:

import numpy as np
import pandas as pd
import eikon as tr

from eikon import Profile as profile
profile.get_scripting_proxy_port = lambda:9000

tr.set_app_id('...')
....

Thank you for your response Zhenya.

I have tried to run the following but i still get this error:

Code:

import numpy as np

import pandas as pd

import eikon as tr 

from eikon import Profile as profile 

profile.get_scripting_proxy_port = lambda:9000

tr.set_app_id('XXX') 

df = tr.get_data(['600781.SS'], ["PRC_QL_CD"])

Error:

**** line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None

JSONDecodeError: Expecting value

Any ideas why?

@jdog88, not really. What happens if you do:

df = tr.get_data(['600781.SS'], ["PRC_QL_CD"], raw_output=True)

?

Still get the same error. Although sometimes it switches back to the following:

EikonError: 'Error code 401 | Eikon Proxy not installed or not running. Please read the documentation to know how to install and run the proxy. '

Could you share whether this problem can be solved by the new version of Eikon Python API or not?

Show more comments

1 Answer

Upvotes
15.2k 40 12 19

This issue is being fixed and an update should be available in a week or so. The underlying problem is that port 9000 is in use by another application and Eikon proxy fails to listen on an alternate port.

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.