Parameters format does not work

I am raising this on behalf of client. Why does this script/parameter format does not work?
import refinitiv.data as rd
rd.open_session()
df = rd.get_data(
universe = ['AAPL.O'],
fields = ['TR.F.TotRevenue'],
parameters={'ReportingState': 'Orig'},
)
Kindly note that I have given this below script (codebook) to the client and it works for him. What is wrong with the above script? Client also said that above script worked for his friend but not for him.
import refinitiv.data as rd
rd.open_session()
df = rd.get_data(
universe = ['AAPL.O'],
fields = ['TR.F.TotRevenue(ReportingState=Orig)']
)
Answers
-
Hi @Mayeen.Neri ,
I cannot replicate the issue. Could you please let me know what does the 'not work' behavior is here? Are there any error message returned?
0 -
The client can enable the debug log to verify what the problem is by using the following code.
import refinitiv.data as rd
config = rd.get_config()
config.set_param("logs.transports.console.enabled", True)
config.set_param("logs.level", "debug")
rd.open_session()
df = rd.get_data(
universe = ['AAPL.O'],
fields = ['TR.F.TotRevenue(ReportingState=Orig)'])
df0 -
RDError Traceback (most recent call last)
Cell In[1], line 6
4 config.set_param("logs.transports.console.enabled", True)
5 config.set_param("logs.level", "debug")
----> 6 df = rd.get_data(
7 universe = ['AAPL.O'],
8 fields = ['TR.F.TotRevenue'],
9 parameters={"ReportingState": "Orig"},
10 )
File c:\ProgramData\miniconda3\envs\eik\Lib\site-packages\refinitiv\data\_access_layer\get_data_func.py:126, in get_data(universe, fields, parameters, use_field_names_in_headers)
124 if exceptions and all(exceptions):
125 except_msg = "\n\n".join(exceptions)
--> 126 raise RDError(-1, except_msg)
128 hp_and_cust_inst_data = HPAndCustInstDataContainer(stream_columns, stream_data, stream_df)
129 adc_data = ADCDataContainer(adc_raw, adc_df, fields)
RDError: Error code -1 | The 'Orig' is unrecognized for parameter 'ReportingState'. Requested universes: ['AAPL.O']. Requested fields: ['TR.F.TOTREVENUE']This is the error i get @Jirapongse @raksina.samasiri
The extra config logging didn't output anything interesting, just the following
[I 10:05:35] [httpx] HTTP Request: GET http://localhost:9010/api/status "HTTP/1.1 200 OK"
[I 10:05:35] [httpx] HTTP Request: POST http://localhost:9010/api/handshake "HTTP/1.1 200 OK"
[I 10:05:39] [httpx] HTTP Request: POST http://localhost:9010/api/udf "HTTP/1.1 200 OK"0 -
The other query also doesn't appear to work for me:
---------------------------------------------------------------------------
RDError Traceback (most recent call last)
Cell In[2], line 3
1 import refinitiv.data as rd
2 rd.open_session()
----> 3 df = rd.get_data(
4 universe = ['AAPL.O'],
5 fields = ['TR.F.TotRevenue(ReportingState=Orig)'],
6 )
File c:\ProgramData\miniconda3\envs\eik\Lib\site-packages\refinitiv\data\_access_layer\get_data_func.py:126, in get_data(universe, fields, parameters, use_field_names_in_headers)
124 if exceptions and all(exceptions):
125 except_msg = "\n\n".join(exceptions)
--> 126 raise RDError(-1, except_msg)
128 hp_and_cust_inst_data = HPAndCustInstDataContainer(stream_columns, stream_data, stream_df)
129 adc_data = ADCDataContainer(adc_raw, adc_df, fields)
RDError: Error code -1 | The 'ORIG' is unrecognized for parameter 'REPORTINGSTATE'. Requested universes: ['AAPL.O']. Requested fields: ['TR.F.TOTREVENUE(REPORTINGSTATE=ORIG)']0 -
Please set the config before opening the session.
import refinitiv.data as rd
config = rd.get_config()
config.set_param("logs.transports.console.enabled", True)
config.set_param("logs.level", "debug")
rd.open_session()0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛