Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 1 3

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-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.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 512.0 KiB each and 1.0 MiB total.

Upvotes
3 1 1 3

Brilliant that worked. Thank you!

icon clock
10 |1500

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

Upvotes
9 3 2 3

@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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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