session open but queries return None / Empty DF using RDP library
Hello,
Following the question: https://community.developers.refinitiv.com/questions/82358/all-data-platform-session-queries-return-none-pyth.html?childToView=89782
I am able to start a session but any requests to retrieve data I make - rdp.get_snapshot, etc - return Nonetype objects.
The session appears to open fine.
Input:
import refinitiv.dataplatform as rdp
from platform import python_version
print(rdp.__version__)
print(python_version())
rdp.open_desktop_session('xxxx')
x = rdp.get_snapshot(
universe = ['GBP=','JPY='],
fields = ['BID','ASK'])
print(x)
print(rdp.get_last_status())
rdp.close_session()
Output:
1.0.0a7
3.9.0
None
{'http_status_code': -1, 'http_reason': b"[Errno 10061] Connect call failed ('127.0.0.1', 9060)"}
@umer.nalla suggestions from previous post:
Your error message would suggest you are creating a Desktop session, but that the library cannot connect to the Eikon Data API proxy.
Do you have Eikon or Workspace open and running on the same physical PC where you are running the python script?
What response do you get to the following?
http://localhost:9000/ping?all
http://localhost:9060/ping?all
and also:
http://localhost:9060/api/
http://localhost:9000/api/
1. Yes, I have my Workspace open and running on the same physical PC where I'm are running the python script.
2. I checked all the links to open and all the links can not be opened (blank screen, loading) but one the http://localhost:9060/api/ showing message on screen: 'This site can’t be reached'.
Thanks, Piotr
Best Answer
-
Sorry - but I overlooked your responses earlier regards the HTTP requests.
The fact that you don't get a response from the ping or api call suggests the Eikon Data API Proxy is not running or has connectivity issues.
At the most basic, if the Proxy was running, you would get a response on 9000/9060.
Can you check with your internal security team if there are restrictions affecting the running of the proxy?
The requested log output above may also help shed some light.
0
Answers
-
Ok - 1st thing to note is that you have a very old version of RDP Library
a7 version was released in October 2020 - refinitiv-dataplatform · PyPI and there have been multiple versions since then.
Please try installing the latest version
pip install refinitiv-dataplatform==1.0.0a13
0 -
Thanks for reply.
After package installation there were some incompatibility errors in my terminal:
Successfully uninstalled refinitiv-dataplatform-1.0.0a7
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dep
endency conflicts.
http3 0.6.7 requires h11==0.8.*, but you have h11 0.12.0 which is incompatible.
eikon 1.1.14 requires nest-asyncio>=1.5.1, but you have nest-asyncio 1.3.3 which is incompatible.
Successfully installed h11-0.12.0 httpcore-0.14.5 httpx-0.21.3 refinitiv-dataplatform-1.0.0a13Then when I tried to run the Input again. It stops at the last line of code:
import refinitiv.dataplatform as rdp
from platform import python_version
print(rdp.__version__)
print(python_version())
rdp.open_desktop_session('xxxx')Output:
1.0.0a13
3.9.0
ERROR!!! An error occurred while requesting URL('http://localhost:9060/api/status').
ConnectError('All connection attempts failed')
ERROR!!! An error occurred while requesting URL('http://localhost:9000/api/status').
ReadTimeout('')
ERROR!!! An error occurred while requesting URL('http://localhost:9060/api/status').
ConnectError('All connection attempts failed')
Error: no proxy address identified.
Check if Desktop is running.
Error on handshake url http://localhost:9000/api/handshake : JSONDecodeError('Expecting value: line 1 column 1 (char 0)')My Workspace desktop is running.
I had this error earlier, so I reinstalled python and all python libraries, installed a13 of rdp but the error persisted. I received advice to install a7 version of rdp and it partially helped because I was able to open session but could not retrieve data.
Thanks, Piotr
0 -
Can you please provide the output for pip freeze for the python env - so I can share it with the RDP Lib support team?
0 -
Can you also enable logging and provide the output
import logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)
import refinitiv.dataplatform as rdp0 -
Hi @umer.nalla
It is also my prediction that this is related to security restrictions.
Thanks for confirming this. I will check first this with out security team.
0 -
The following thread may also help in your discussion with your security team
Error on handshake port 9060 : TimeoutException - Forum | Refinitiv Developer Community
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛