Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by Hanwha-total1 · Oct 07, 2020 at 04:31 PM · eikon proxy apiport

Error code -1 | Port number was not identified. eikon lib error.

sorry I can't write English.


sample code:


import eikon as ek ek.set_app_key('cxxxxx') 

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

----------------------------------

http://localhost:9000/ping?all

{"port":9000,"mode":"eikon4","pid":5352,"hasSecure":true,"startedTime":"Thu Oct 08 2020 00:46:08 GMT+0900 (대한민국 표준시)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{
  "path":"/api"},{"path":"/sxs/v1/services/messenger"}]}


checkeikondataapi.ps1

output.txt


OS : window 10
Python version : 3.8.6 32bit

IDE : Pycharm

eikin lib version : 1.1.6.post3,
httpx version : 0.15.5




Eikon Desktop Info
eikon-desktop-info.txt


test ---
eikon lib version

1.1.2 work.

1.1.4 not work. Port number was not identified

1.1.5 not work. Port number was not identified

1.1.6 not work. Port number was not identified



thank you.

output.txt (80.8 KiB)
eikon-desktop-info.txt (6.6 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

3 Replies

  • Sort: 
avatar image
Best Answer
Answer by Hanwha-total1 · Oct 13, 2020 at 01:15 AM

Thank you.. it's work.
eikon lib version : 1.1.6.post3
nest-asyncio lib version : 1.3.3


Thank you.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by jirapongse.phuriphanvichai · Oct 08, 2020 at 11:06 AM

@Hanwha-total1

From the output.txt, the proxy is running. The problem could be in the Python libraries.

GET: http://127.0.0.1:9000/sxs/v1 => Status Code: 200
GET: http://127.0.0.1:9000/ping => Status Code: 200
POST: http://127.0.0.1:9000/api/v1/data => Status Code: 200

I can replicate the issue with Python 3.8 (32 bit) and Eikon 1.1.6.

From my checking, it uses nest-asyncio 1.4.1. I found an issue in GitHub. Therefore, I downgraded it to 1.3.3.

pip3.8 install nest-asyncio==1.3.3

Then, it works fine.

Comment
henrique.hissataka

People who like this

1 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Hanwha-total1 · Oct 11, 2020 at 01:48 PM 0
Share



eikon lib version 1.1.6
nest-asyncio lib version 1.3.3

um... it not works.


eikon lib 1.2.2 is work.

avatar image
REFINITIV
pierre.faurel Hanwha-total1 · Oct 12, 2020 at 10:02 AM 0
Share

The root cause should be found (see below last response)

avatar image
REFINITIV
Answer by jirapongse.phuriphanvichai · Oct 12, 2020 at 03:18 AM

@Hanwha-total1

You can try the following command as mentioned in this thread.

> python -c "import httpx; print(httpx.get('http://localhost:9060/api/status'))" 

And,

> set NO_PROXY=localhost:9000,localhost:9060

> python -c "import httpx; print(httpx.get('http://localhost:9060/api/status'))"

Then, use the following code to list the versions of python libraries.

import pkg_resources
installed_packages = pkg_resources.working_set
installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
   for i in installed_packages])
print(installed_packages_list)

Enable logging in asyncio and httpx with the following environment variables.

PYTHONASYNCIODEBUG=1
HTTPX_LOG_LEVEL=trace

Then set logging to a file.

import logging
logging.basicConfig(filename='example.log', level=logging.DEBUG)

Please share the package versions and log file. You need to remove the application key in the log file.

Comment

People who like this

0 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Hanwha-total1 · Oct 12, 2020 at 04:37 AM 0
Share


attach file.

thank you

log.txt

log.txt (2.8 KiB)
avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ Hanwha-total1 · Oct 12, 2020 at 05:07 AM 0
Share

@Hanwha-total1

Can you test with 'eikon==1.1.6.post3'?

1.1.6.post3 should not have this error.

DEBUG:pyeikon:Error on checking port 9000 : AttributeError("'Request' object has no attribute 'prepare'")
avatar image
REFINITIV
pierre.faurel Hanwha-total1 · Oct 12, 2020 at 07:38 AM 0
Share

Hi,

Your log.txt shows that you have 'httpx==0.16.1'

We identified that last versions (0.15 and 0.16) cause issues within connection to Eikon.
We're investigating this. In the meantime, we recommend to downgrade to 0.14.3 version (pip install httpx==0.14.3)


Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Python API Error on handshake port 9000

Eikon Api Proxy App ID Generator is not working

Your Eikon account is not allowed to run Eikon API Proxy response when using Eikon API R.

Error code 401: Eikon Proxy not installed or not running.

Retrieve Portfolio charted performances API from PORT app

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges