For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 2

PlatformSession' object has no attribute '_get_udf_url'

Hi,

When using the 'eikon' module, the below code works, but using the 'refinitiv.dataplatform.eikon' module as per the tutorials, yields the below '_get_udf_url' attribute error. Running python 3.8. Any ideas on how to rectify?

Thanks in advance for any help!



import refinitiv.dataplatform.eikon as ek

# import eikon as ek


ek.set_app_key('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')

ek.get_timeseries('EUR=', interval='daily')


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-44-d3cb9f2bda23> in <module>
----> 1 ek.get_timeseries('EUR=', interval='daily')

~\AppData\Local\dbconda-2021_05-py38-r36\lib\site-packages\refinitiv\dataplatform\legacy\time_series.py in get_timeseries(rics, fields, start_date, end_date, interval, count, calendar, corax, normalize, raw_output, debug)
    199                 raise ValueError(error_msg)
    200 --> 201     response = refinitiv.dataplatform.legacy.json_requests.send_json_request(
    202         TimeSeries_UDF_endpoint, payload, debug=debug
    203     ) 
~\AppData\Local\dbconda-2021_05-py38-r36\lib\site-packages\refinitiv\dataplatform\legacy\json_requests.py in send_json_request(entity, payload, ID, debug, raw_response)
     86             udf_request = {
  "Entity": {
  "E": entity, "W": data}, "ID": ID}
     87             logger.debug(
---> 88                 "Request to {} :{}".format(_session._get_udf_url(), udf_request)
     89             )
     90             response = _session.http_request( 
AttributeError: 'PlatformSession' object has no attribute '_get_udf_url'


eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikon
icon clock
10 |1500

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

Upvote
Accepted
4.3k 2 4 5

Hi @daryl.li ,

Thank you for raising this issue, we'll fix it in a next version.

You can use eikon module with a destop session as below:

import refinitiv.dataplatform as rdp
import refinitiv.dataplatform.eikon as ek

rdp.open_desktop_session('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
ek.get_timeseries('EUR=', interval='daily')
icon clock
10 |1500

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

Upvotes
3 0 0 2

Brilliant that worked. Thank you!

icon clock
10 |1500

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

Upvotes
9 2 1 2

@pierre.faurel Has a fix been implemented? I am getting the same error. It seems that `refinitive.dataplatform.eikon.get_data()`, `refinitive.dataplatform.eikon. get_news_headlines()`, `refinitive.dataplatform.eikon.get_news_story()`, and `refinitive.dataplatform.eikon.get_timeseries()` do not work when using a RDP platform session.

icon clock
10 |1500

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

Click below to post an Idea Post Idea