Hi Refinitiv Developer Community,
I'm trying to authenticate to the Refinitiv Data Platform using the refinitiv-data Python library, specifically version 1.6.2. My environment is Python 3.12 running on Ubuntu.
My goal is to establish a platform session using my RDP credentials (App Key, RDP Username [which is a Machine ID like GE-A-00220069-3--...], and Password Machine for ID).
I'm attempting to use the rdp.session.platform.Definition class to configure the session and then open it with rdp.open_session(config=...), similar to the structure below:
import refinitiv.data as rdp
import traceback
import sys
RDP Credentials (Using placeholders)
RDP_APP_KEY = "YOUR_APP_KEY_PLACEHOLDER"
RDP_USERNAME = "YOUR_MACHINE_ID" # e.g., GE-A-00220069-3--...
RDP_PASSWORD = "YOUR_RDP_PASSWORD_PLACEHOLDER"
try:
print("Defining RDP platform session configuration...")
# --- Attempting to configure platform session ---
# Trying different parameter combinations here causes TypeErrors
session_definition = rdp.session.platform.Definition(
app_key=RDP_APP_KEY,
# What are the correct parameter names here for v1.6.2?
# Attempts:
# 1. username=RDP_USERNAME, password=RDP_PASSWORD
# => TypeError: ... got an unexpected keyword argument 'username'
# 2. rdp_signon_username=RDP_USERNAME, rdp_password=RDP_PASSWORD
# => TypeError: ... got an unexpected keyword argument 'rdp_signon_username'
# 3. Also tried adding sign_on_control=True (combined with above)
# => TypeError: ... got an unexpected keyword argument 'sign_on_control'
# Need the correct parameter names below:
parameter_name_for_username = RDP_USERNAME,
parameter_name_for_password = RDP_PASSWORD
)
print("Opening Refinitiv Data Platform session using definition...")
rdp.open_session(config=session_definition)
print("Session opening process initiated...")
# ... rest of the code to use the session ...
except rdp.errors.SessionError as session_error:
# Note: Based on previous errors, SessionError might also not be the correct base class in v1.6.2
print(f"Session Error: {session_error}", file=sys.stderr)
traceback.print_exc()
except Exception as e: # This catches the TypeError etc.
print(f"An unexpected error occurred during setup or execution: {e}", file=sys.stderr)
traceback.print_exc()
finally:
try:
print("Closing session...")
rdp.close_session()
except Exception as close_session_err:
print(f"Error closing session: {close_session_err}", file=sys.stderr)
print("Cleanup finished.")
As noted in the code comments, I've tried various keyword arguments like username, password, rdp_signon_username, rdp_password, and sign_on_control, but they all result in a TypeError: Definition.init() got an unexpected keyword argument '...'.
Could someone please advise on the correct keyword arguments required by rdp.session.platform.Definition in refinitiv-data version 1.6.2 when authenticating with an App Key and RDP Username/Password? Or is there a different preferred method for this authentication type in v1.6.2?
Any help or pointers to the relevant v1.6.2 documentation would be greatly appreciated!
Thanks,
Ian