question

Upvotes
Accepted
1 0 0 2

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

rdp-apierrorconnection-error
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
25k 87 11 23

Hi @piotr.arendarski

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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25k 87 11 23

Hi @piotr.arendarski

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 





icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 2

@umer.nalla

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.0a13

Then 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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25k 87 11 23

Hi @piotr.arendarski

Can you please provide the output for pip freeze for the python env - so I can share it with the RDP Lib support team?


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25k 87 11 23

Hi @piotr.arendarski

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 rdp
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 2

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @piotr.arendarski

The following thread may also help in your discussion with your security team

Error on handshake port 9060 : TimeoutException - Forum | Refinitiv Developer Community