question

Upvotes
Accepted
3 1 0 4

RSearch COM API in Python

Hi,

I tried to use the RSearch COM api in Python similar to using the adfin library as described in https://developers.refinitiv.com/article/using-adfinx-analytics-python

So I setup the connectionToEikon object as

connectionToEikon = win32com.client.DispatchWithEvents("EikonDesktopDataAPILib.EikonDesktopDataAPI", EikonDesktopDataAPI_EventHandler)

Then I try to create the RSearch instance

rsearch= connectionToEikon.CreateRSearchMgr()

However no rsearch instance is created.


I was running py makepy.py "..\X\Bin\Apps\TR.OFFICE.CORE\0.0.0.0\Bin\RSearch.dll" and creating instances of other com libraries works e.g. connectionToEikon.CreateMetaDataMgr works.


eikonpythoneikon-com-api
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
38.1k 71 35 53

@dennis-za.bergmann

From my test, it doesn't work with RSearch. I can call CreateRSearchMgr but I get the AttributeError when calling Initialize.

            rsearch = connectionToEikon.CreateRSearchMgr()            
            rsearch.Initialize(3)
Calling GetIDsOfNames for property Initialize in Dispatch container CreateRSearchMgr
Traceback (most recent call last):
  File "C:\Users\u8009686\source\repos\EikonCOMPython\EikonCOMPython\SampleAdCalibrateEikonDesktopDataAPI.py", line 71, in <module>
    rsearch.Initialize(3)
  File "C:\Users\u8009686\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\dynamic.py", line 527, in __getattr__
    raise AttributeError("%s.%s" % (self._username_, attr))
AttributeError: CreateRSearchMgr.Initialize

Did you get this AttributeError: CreateRSearchMgr.Initialize error?

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 1 0 4

Thanks for your answer. That is exactly the error I get, too.

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
38.1k 71 35 53

@dennis-za.bergmann

I think that RSearch COM API is unable to work in Python.

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