You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
version? red.search() returns "TypeError: search() takes 0 positional arguments but 1 was given" #1
Are you using the version available on pypi (refinitiv-dataplatform 1.0.0a0) or do you have a different version from the Early Access Program,etc?
I am using python 3.7 & pip installed refinitiv-dataplatform 1.0.0a0 today, however the rdp.search() & rdp.get_search_metadata() functionality do not work. I can however use other functionality such as rdp.get_historical_price_summaries() & return expected results. Any suggestions as to what is causing this? Code & returned errors below.
import refinitiv.dataplatform as rdp
rdp.open_desktop_session(my_app_key)
rdp.search('TSLA')
"TypeError: search() takes 0 positional arguments but 1 was given"
@jeff-anderson-sp
I’ve looked into the issues you're seeing with rdp.search() and rdp.get_search_metadata().
The root cause is the library version: refinitiv-dataplatform 1.0.0a0. This specific version is an early alpha release that contains only "placeholders" for the search functionality. I inspected the source code for 1.0.0a0 and confirmed that search() is defined without any arguments, and get_search_metadata is missing entirely from that build.
To solve this, we have two options:
Option 1: Recommended (Upgrade to the Modern Library)
The refinitiv-dataplatform library is now legacy. The most stable solution is to switch to the current Refinitiv Data (RD) Library:
Option 2: Minimal Change (Upgrade to Latest Legacy Alpha)
If we need to keep the dataplatform namespace for now, we must upgrade to at least version 1.0.0a21, where the search implementation was actually added:
Install: pip install refinitiv-dataplatform==1.0.0a21
Updated Code:
python
import refinitiv.dataplatform as rdp
rdp.open_desktop_session(my_app_key)
results = rdp.search(query='TSLA')
metadata = rdp.get_search_metadata(view=rdp.SearchViews.GovCorpInstruments)
Note: The syntax rdp.search.Definition() you were considering belongs to the newer refinitiv-data structure, so it won't work in the dataplatform library regardless of the version.
Activity
AirbusA321NX commentedon May 5, 2026
@jeff-anderson-sp
I’ve looked into the issues you're seeing with rdp.search() and rdp.get_search_metadata().
The root cause is the library version: refinitiv-dataplatform 1.0.0a0. This specific version is an early alpha release that contains only "placeholders" for the search functionality. I inspected the source code for 1.0.0a0 and confirmed that search() is defined without any arguments, and get_search_metadata is missing entirely from that build.
To solve this, we have two options:
Option 1: Recommended (Upgrade to the Modern Library)
The refinitiv-dataplatform library is now legacy. The most stable solution is to switch to the current Refinitiv Data (RD) Library:
Install: pip install refinitiv-data
Updated Code:
import refinitiv.data as rd
rd.open_session()
df = rd.discovery.search(
query='TSLA',
view=rd.discovery.Views.EQUITIES
)
OR
Option 2: Minimal Change (Upgrade to Latest Legacy Alpha)
If we need to keep the dataplatform namespace for now, we must upgrade to at least version 1.0.0a21, where the search implementation was actually added:
Install: pip install refinitiv-dataplatform==1.0.0a21
Updated Code:
python
import refinitiv.dataplatform as rdp
rdp.open_desktop_session(my_app_key)
results = rdp.search(query='TSLA')
metadata = rdp.get_search_metadata(view=rdp.SearchViews.GovCorpInstruments)
Note: The syntax rdp.search.Definition() you were considering belongs to the newer refinitiv-data structure, so it won't work in the dataplatform library regardless of the version.
Let me know which path you'd like to take!
Best regards,