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

Answers

  • @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. '

  • 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.

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

  • Hi @jdog88
    "

    Could you please let us know if the problem still occur with the new version of Eikon Python API?