I want to use Datastream in python, I get an error message when I try to log in using the credentials below.
DWE = Datastream(username="%$#%#$", password="%$#%$#") DWE.system_info() DWE.sources()
URLError: <urlopen error [WinError10061] No connection could be made because the target machine actively refused it>
I have successfully imported pydatastream etc.
Based on above example you are not using DSWS (Datastream Web Service) but instead DWE (Dataworks Enterprise), which is not compatible with Python 3.6 and above. There is a document on the DSWS page providing overview on how to convert DWE request to DSWS: document https://developers.thomsonreuters.com/sites/default/files/Converting%20DWE%20to%20DSWS.pdf
If you don't have DSWS access I would advise to contact your Refinitiv representative.