Help on FTP access through Python?

Hi, for awhile now I have been using the following block of code to access our datastream FTP:

with FTP("datastreamddl.refinitiv.com") as ftp:

print('Please input username')

user_ = getpass.getpass()

print('Please input password')

password = getpass.getpass()


This has previously worked without errors but now, before I am even prompted to enter the username and password, I get the following error:

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

Any help on this would be greatly appreciated

Tagged:

Best Answer

  • Gurpreet
    Answer ✓

    Hi @cole,

    The plain FTP's have been disabled in many of LSEG/Refinitiv services. You will have to use SFTP connection. I get this message when connecting using SFTP:

    Datastream Data Loader (DDL) Live server - only port 22 connections permitted from 13 January 2024.

    Port 22 is SFTP port.