Skip to content

version? red.search() returns "TypeError: search() takes 0 positional arguments but 1 was given" #1

Open

Description

@jeff-anderson-sp

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"

rdp.get_search_metadata(view = rdp.SearchViews.GovCorpInstruments)

"AttributeError: module 'refinitiv.dataplatform' has no attribute 'get_search_metadata'"

Activity

  1. AirbusA321NX commented on May 5, 2026

    @AirbusA321NX

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions