question

Upvotes
Accepted
3 2 4 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 512.0 KiB each and 1.0 MiB total.

Hello @dennis-za.bergmann

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


Upvote
Accepted
78.8k 250 52 74

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

Upvotes
3 2 4 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 512.0 KiB each and 1.0 MiB total.

Upvotes
78.8k 250 52 74

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