how we can disable the SSL verification in the python implementation/code (see below)? Additionally, is there documentation for the python API for the lseg.data component? We found this but I cannot find the specific information we are looking for: Refinitiv Data Library for Python [cdn.refinitiv.com]. Can you please point us in the right direction? I’ve included my Dataiku administration team for awareness and to fill in any of the blanks I may have left.
Here is a code snipet that we are trying to use via Dataiku to connect via the API:
#libs
import dataiku, pandas as pd
import lseg.data as ld
#log in info
client = dataiku.api_client()
auth = client.get_auth_info(with_secrets=True)
secrets={s["key"]: s["value"] for s in auth.get("secrets",[])}
APP_KEY = secrets.get("LSEG_APP_KEY")
CLIENT_ID = secrets.get("LSEG_CLIENT_ID")
CLIENT_SECRET = secrets.get("LSEG_CLIENT_SECRET")
#open lseg
session = ld.session.platform.Definition (
app_key=APP_KEY,
grant=ld.session.platform.ClientCredentials(
client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
),
signon_control=True
).get_session()
session.open()
ld.session.set_default(session)
query='("cyber security", OR cybersecurity OR ransomware OR "data breach") AND source:RTRS AND Language:LEN'
res = ld.news.get_headlines(query=query, count=50)
df = getattr(res,"data", None).df if hasattr(res, "data") else res
out = dataiku.Dataset("RT")
out.write_with_schema(df)
ERROR:
An error occurred while requesting URL('https://api.refinitiv.com/auth/oauth2/v2/token [api.refinitiv.com]').
ConnectError('[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1133)')
[Error 0] - {}
Session is not opened. Can't send any request