Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Cannot open.session() for refinitiv.data API

I am trying to use the below function to access the daily market prices from the refinitiv data API. However, at session.open() I get an error - in the _utils.py, " ValueError: Proxy keys should use proper URL forms rather than plain scheme strings. instead of "qualys_http", user "qualys_http://"


Can some one help me with resolving this issue. Thanks.

1706286586129.png

Error

1706286924504.png

rdp-api#productsession
1706286924504.png (243.5 KiB)
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.

Hello @pulara.mapatuna

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Hi @pulara.mapatuna ,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thank you,

AHS

Upvotes
Accepted
79.2k 251 52 74

@pulara.mapatuna

It shouldn't relate to the Refinitiv Data Library. It could be the problem in the Python environment. You can test the connection with the following code.

import requests
url = "https://api.refinitiv.com/auth/oauth2/v1/token"
payload = 'username=<username>&password=<password>&grant_type=password&scope=trapi&takeExclusiveSignOnControl=true&client_id=<client_id>'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
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
79.2k 251 52 74

@pulara.mapatuna

Thank you for reaching out to us.

According to the error, it may relate to the proxy settings.

1706504704050.png

Please check that if you are using a proxy server on the machine and what the qualys_http is.



1706504704050.png (19.1 KiB)
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 1

@Jirapongse thanks for the reply. I am running this on a dev machine VDI, on Amazon Workspace. Perhaps the issue come because of this? 1706519386408.png


1706519386408.png (13.7 KiB)
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.

@pulara.mapatuna

According to the error, it is about the proxy settings.

Sorry, I can't test it. I don't have an access to that environment.

Upvotes
1 0 0 1

@Jirapongse I was able to manage the proxy issue, but I am getting the below error now1707819732204.png would you happen to know what might be causing this?


1707819732204.png (10.6 KiB)
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 1

@Jirapongse thank you.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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