Python Forum

Full Version: Python 3.7.4 (FTPLib Deprecated). Now What?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been running a Python script for a while that scrapes data from a website, parses through what it finds, saves everything to a CSV file, and then uses FTPLib to move the CSV to an FTP location.

We've moved everything recently to a new machine which is running Python 3.7.4, and I keep getting an error message when trying to execute my Python script of:

--- ImportError: cannot import name 'FTP_TLS' from 'ftplib' (c:\programdata\anaconda3\lib\ftplib.py)

In doing some research, it appears that this library was deprecated in a slightly earlier version of Python and will not work with Python version 3.7.4.

I've tried using another couple of Python FTP-related libraries that I've found, but the issue there is that it won't allow my Python-coded connection into the FTP location due to it saying that SSL/TLS is required, and these other Python FTP-related libraries I've found apparently don't support SSL/TLS-enabled FTP connections.

Any thoughts on this as well? I've Googled this extensively today and haven't really turned up any suggestions at all.

Thanks in advance!
this is the recommended replacement: https://docs.python.org/3.9/library/ssl....cert_chain
SSLContext.load_cert_chain