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 marketintelligence · Oct 08, 2020 at 11:12 AM · eikondataapieikonapieikonerror#errormessage

Error Code 2504- Occurs at random times in code, how is this error caused and how is it solved?

error-gateway.png (21.6 KiB)
Erik77

People who like this

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

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by pierre.faurel · Oct 08, 2020 at 01:24 PM

Hi,

As you mention, this error could occur randomly.

A way to protect your code is to catch the exception then retry your request after a delay.

Ex:

from threading import Event
timer = Event()
...
while True:
    try:
        ts = ek.get_timeseries(...)
        break
    except ek.EikonError as err:
        if err.err_code != 2504:
            # request failed with other reason than 2504 error code
            break
        # let's retry after a delay
        timer.wait(1)

(timer.wait() is better than time.sleep())

Comment

People who like this

0 Show 1 · 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
s.gopikrishna · Dec 04, 2020 at 09:05 PM 0
Share

Hi,

I'm having the same issue. I'm retrying a few times, and still seeing either "Error code 2504 | UDF Core request failed. Gateway Time-out" or "Error code 500 | Backend error. 500 Internal Server Error". Would you know the reason why this occurs?

Also, could you please elaborate on why timer.wait() is preferable? Would switching from time.sleep() to timer.wait() help alleviate these issues?

Thank you,

Shashank

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 >
11 People are following this question.

Related Questions

Retrieve all broker esitmates for a given RIC/instrument

I would like to know whether the Data Limits of Eikon API may change if I subscribe to a "larger" (and costlier?) account

How can I get historical ESG data?

Date for total revenue

Gap in FX data via Eikon API

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