Hello,
I am currently trying to retrieve streaming news for RDP platform.
When I run the following code in a jupyter notebook cell all is working fine :
import refinitiv.dataplatform as rdp
import datetime
import zlib
import base64
import json
APP_KEY = '***'
MACHINE_ID = '***'
PASSWD = '***'
rdp.open_platform_session(app_key=APP_KEY,
grant=rdp.GrantPassword(username=MACHINE_ID,
password=PASSWD)
)
item_stream = rdp.ItemStream(session=rdp.get_default_session(),
domain=DOMAIN,
name=NAME, #should be optional
on_refresh = lambda item_stream, event : processMRNstart("Refresh", event),
on_update = lambda item_stream, event : processMRNUpdate("Update", event),
on_status = lambda item_stream, event : processMRNstart("Status", event),
on_complete = lambda item_stream : processMRNstart("Complete", "")
)
item_stream.open()
However, when I copy paste this code into a python script .py and run in into the command shell it stucks around the rpd.open_platform_session function and nothing happens.
Any ideas about the different behavior between Jupyter notebook and Python scripts for getteting streaming news from RDP platform ?