Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Datastream /
avatar image
Question by ling.bao · Jan 29, 2019 at 08:00 AM · connectionpydsws

PyDSWS ConnectionError

I have trouble with the login

ds = PyDSWS.Datastream(username='XXX', password='YYY')

This raises a connection error:

ConnectionError: HTTPConnectionPool(host='product.datastream.com', port=80): Max retries exceeded with url: /DSWSClient/V1/DSService.svc/rest/Token?username=XXX&password=YYY (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000000000A5FF588>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))

How should I trouble shoot?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

4 Replies

  • Sort: 
avatar image
Best Answer
Answer by ling.bao · Jan 29, 2019 at 09:15 AM

I have managed to get access now by passing an extra argument containing proxies to PyDSWS\datastream.py.

Comment
adam.samniotis

People who like this

1 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
adam.samniotis · Mar 22, 2019 at 07:32 AM 0
Share

Hi,

can you please share a bit more detail? Can you post part of the code you used?

avatar image
ling.bao · Mar 22, 2019 at 08:41 AM 0
Share

There are several ways to do it. For instance you can use os.environ["http_proxy"]="XXX".

avatar image
daniel.rico · Jun 20, 2019 at 08:31 AM 0
Share

can you please post an example on this? thanks

avatar image
REFINITIV
Answer by Monika.Stankovic · Jan 29, 2019 at 08:15 AM

@8477ab9c-f15e-4a78-9279-fd670f296382

Error "[Errno 11004] getaddrinfo failed" suggest there is an issue with your network, probably corporate firewall/proxy issue. Please contact your corporate IT administrator for help.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by ling.bao · Jan 29, 2019 at 08:39 AM

Yes, I need to go through a proxy. How can I pass the proxy setup/information into PyDSWS?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by daniel.rico · Jun 20, 2019 at 08:29 AM

@ling.bao - How can I pass the proxy setup/information into PyDSWS? I am having the same issue as my project runs using a localhost. Can someone post a full example? thanks

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
ling.bao · Jun 20, 2019 at 08:43 AM 0
Share

import os
os.environ["http_proxy"] = "http://psw:username@proxy_address:8080"

os.environ["https_proxy"] = "http://psw:username@proxy_address:8080"

where psw, username and proxy_address are the information you need to fill in yourself.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

Not able to connect via python

Issue with LME settlement price from PyDSWS

Cannot translate a Datastream excel formula to a python PyDSWS

Bug in from_json_to_df in PyDSWS

error in from_json_to_df in PyDSWS

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges