eikon.eikonError.EikonError: Error code -1 | Port number was not identified. Check if Eikon Deskt...

...op or Eikon API Proxy is running.

I'm trying to get timeseries data in my local-django project, however when I'm trying to get the data I got this error message:

eikon.eikonError.EikonError: Error code -1 | Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.

After creating a new app_key, I have write a lite code in Jupyter in order to understand if my connection works well, and this is what I get:

2020-09-03 09:32:22,231 P[5920] [MainThread 28020] Reset a Desktop session with new app_key 
2020-09-03 09:32:22,232 P[5920] [MainThread 28020] Unlock login_event for streaming session 0 due to stop streaming call
2020-09-03 09:32:22,245 P[5920] [MainThread 28020] Checking port 9060 response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-09-03 09:32:22,246 P[5920] [MainThread 28020] Port 9060 was retrieved from .portInUse file
2020-09-03 09:32:22,246 P[5920] [MainThread 28020] Try to handshake on url http://localhost:9060/api/handshake...
2020-09-03 09:32:22,421 P[5920] [MainThread 28020] Response : 200 - {"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBcGlWZXJzaW9uIjoiMSIsIkFwcEtleSI6Ijc1ZGM2YzkzZjRlNTQ4MTU5OGU0MmI5NDBlZmY2YTJlZGZiODhkNzQiLCJBcHBTY29wZSI6InJhcGkiLCJMaWJyYXJ5TmFtZSI6IkVpa29uIFB5dGhvbiBMaWJyYXJ5IiwiTGlicmFyeVZlcnNpb24iOiIxLjEuNSIsImlhdCI6MTU5OTExODM0MiwiZXhwIjoxNjAwMzI3OTQyfQ.l7lJmXeGNotyvrr0B3j1yJ-CwNYCHLeC2RO1ATbN0FY","expires_in":1209600,"token_type":"bearer"}
2020-09-03 09:32:22,422 P[5920] [MainThread 28020] Application ID: <my_app_key>
2020-09-03 09:32:22,422 P[5920] [MainThread 28020] Init a Desktop session with new app_key
2020-09-03 09:32:22,423 P[5920] [MainThread 28020] Port 9060 on local proxy was detected
2020-09-03 09:32:22,424 P[5920] [MainThread 28020] entity: TimeSeries 2020-09-03 09:32:22,425 P[5920] [MainThread 28020] payload: {'rics': ['AAPL.O'], 'fields': ['CLOSE', 'TIMESTAMP'], 'interval': 'daily', 'startdate': '2020-07-30T00:00:00', 'enddate': '2020-08-31T00:00:00'}

but I get some data.

However if use the same code in the Django project I get this error

eikon.eikonError.EikonError: Error code -1 | Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.

I'm running the django application server on PORT 8080, if I remember well Eikon use the 8000

python manage.py runserver 8080

Thank you for your help.


Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    @c.aydemir

    Thank you very much for your feedback. We believe we identified the root cause of the problem, which manifests with Python 3.8+. The root cause happened to be in the dependencies of Eikon Data APIs for Python library (requests-async, http3 and nest-asyncio).
    The problem has been addressed in Eikon Data APIs for Python library v1.1.6, which is now available on PyPI. Would you be so kind as to upgrade eikon module on your machine to v1.1.6 and see if it works? I'd very much appreciate if you could post your experience back on this thread.

Answers