Eikon Data API: Error code 500

Hi,
I have been using the Eikon Data API for more than a year and it worked well until recently. I'm getting the following error message:
Error code 500 | Server Error: Internal Server Error - {"code":500,"message":"connect ETIMEDOUT 159.220.1.19:443","statusMessage":"Internal Server Error"}
Can you help me?
Best Answer
-
Hi Pierre! Good news. It worked! The issue was indeed because of nest-asyncio 1.4.1
Thanks a lot!
0
Answers
-
Hi,
Could you provide following information ?
- eikon lib and Eikon Desktop version
- involved eikon functions (it seems to be streaming API)
- is issue always reproduced or time to time ?
0 -
Hi,
1. Desktop 4.0.52055. What is Eikon lib? maybe the API key can help you investigate, do you need it? is it safe to post it here?
2. yes I import eikon in python as ek, then ek.get_news_story, ek.set_app_key(, ek.get_news_headlines
3. The issue is always reproducible.
0 -
Hi Refinitiv support team,
The issue is still present today. Have you had a chance to look into the problem?
Rgds,
0 -
Hi,
To avoid any confusion with previous issues, I assume you're up-to-date with eikon version (1.1.6.post3)
The 500 error comes from the platform and we need more information to identify the root cause.
Could you give examples of get_news_headlines() and get_news_story() usages ?0 -
No actually my version is 1.0.0! So I will update it first and keep you posted. Thanks Pierre.
0 -
So I updated my eikon package to version 1.1.6.post3.
Then it worked for a moment and now it's back to error 500. But there is a new message now:
2020-09-29 16:45:35,369 P[6300] [MainThread 9780] Error on handshake port 9060 : TimeoutException("TimeoutException on HTTP request: ReadTimeout('',)",)
2020-09-29 16:45:56,378 P[6300] [MainThread 9780] Error code 500 | Server Error: {"code":500,"message":"connect ETIMEDOUT 159.220.1.19:443","statusMessage":"Internal Server Error"}
exception occured : Error code 500 | Server Error: {"code":500,"message":"connect ETIMEDOUT 159.220.1.19:443","statusMessage":"Internal Server Error"}
Examples of how I use get_news_headlines and get_news_story:
headlines = ek.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100)
allNews = []
index = pd.DataFrame(headlines, columns=['storyId']).values.tolist()
for i, storyId in enumerate(index):
try:
x = parse_news(storyId[0])
allNews.append(x)
except:
continue
parse_news function calls get_news_story once
def parse_news(storyId):
x = ek.get_news_story(storyId)
I hope this can help solve the issue.
Rgds,
Jean-Baptiste
0 -
Hi,
Any progress on this issue?
Let me know if you need more info to solve the issue.
0 -
Also let me know if i should redirect my request to another channel. Maybe this is not the right place for this kind of issues...
0 -
Hi,
I apologize, I didn't see your responses and I was notified by the support about your messages !
The message "2020-09-29 16:45:35,369 P[6300] [MainThread 9780] Error on handshake port 9060 : TimeoutException("TimeoutException on HTTP request: ReadTimeout('',)",) " means that API Proxy in Eikon Desktop is not running.
Could you check following steps :
- To check if API Proxy is running well, you can open http://localhost:9000/api/status
- In your script, you can activate verbose log and when you set app_key, you can test if connection is up before continue as follow:
ek.set_log_level(1) ek.set_app_key("xxxx")
state = ek.get_desktop_session().get_open_state()
if state == ek.Session.State.Open:
headlines = ek.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100)
...3. Lastly, if you can define environment variable HTTPX_LOG_LEVEL=trace then run your script, we'll can have full logs to investigate and check what's the root cause of this error code 500
0 -
Hi Pierre!
Step 1 fails. It gives me "this site can't be reached".
I asked IT and they have no clue. Do you know what I should do?
0 -
Hi,
1. we discovered a regression caused by last version of nest-asyncio dependency.
Could you check that you don't have 1.4.x version but 1.3.3 ?2. Could you follow this following test ?
Open a console windows then type :
> python -c "import httpx; print(httpx.get('http://localhost:9060/api/status'))"
Chek if there is error in output.
Now, type:
> set NO_PROXY=localhost:9000,localhost:9060> python -c "import httpx; print(httpx.get('http://localhost:9060/api/status'))"
Check the output (it should be <Response [200 OK]> )
3. Could you apply step 3 (from my previous message) ?
0 -
My version of nest-asyncio is 1.4.1
When I type: python -c "import httpx; print(httpx.get('http://localhost:9060/api/status'))"
I get the following output:
<Response [200 OK]>
When I type:
> set NO_PROXY=localhost:9000,localhost:9060> python -c "import httpx; print(httpx.get('http://localhost:9060/api/status'))"
I get the following output:
<Response [200 OK]>
Now about step 3 from your previous message, I did this:
Is it ok?
0 -
nest-asyncio 1.4.1 was recently identified as a cause of "Error code -1 | Port number was not identified. eikon lib error."
It's recommended to downgrade to 1.3.3 (with command "pip install nest-asyncio==1.3.3")Once you'll downgrade it, could you run your script and check output (with debug traces as you set HTTPX_LOG_LEVEL to trace).
Once that'll be done, don't forget to delete HTTPX_LOG_LEVEL variable.
0 -
Ok thx I will. I can't do it now because of the firewall but I will try on monday and let you know.
Have a good weekend Pierre!
0 -
Good news.
Thank you for your feedback !
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 614 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 640 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛