Questions tagged [ftputil]

The ftputil Python library provides a high-level interface to remote files over FTP, similar to os, os.path and shutil.

ftputil is an FTP client library for Python. It builds on ftplib from the standard library to provide an interface to the remote directories and files similar to os, os.path and shutil.

34 questions
1
vote
2 answers

How do I keep a FTP connection alive?

I used ftputil to download a batch of files from a FTP server. It raised the error ftputil.error.FTPIOError: [Errno 60] Operation timed out. As described in Documentation – ftputil, keep_alive() attempts to keep the connection to the remote server…
SparkAndShine
  • 17,001
  • 22
  • 90
  • 134
1
vote
1 answer

Unable to import ftputil in Python

I am trying to delete ftp file using Spyder (python 3.8), but one of the import "ftputil" is not working. Error code looks like import ftputil ModuleNotFoundError: No module named 'ftputil' code #! /usr/bin/python import time import ftputil …
dtc348
  • 309
  • 6
  • 19
1
vote
0 answers

python 3.6.5 ftputil download from URL

I have a csv file that contains file paths such as: oa_package/08/e0/PMC13900.tar.gz, oa_package/b0/ac/PMC13901.tar.gz, etc. If one were to type ftp.ncbi.nlm.nih.gov/pub/pmc/oa_package/08/e0/PMC13900.tar.gz into a browser, it would automatically…
Dusty27
  • 11
  • 2
1
vote
0 answers

ftputil variable behavior (errors 10054, 10060)

Hello I have a simple function below to list all files on a ftp server. import ftputil ftp = ftputil.FTPHost("3.xxx.xxx.xx","xxxxxxxx", "xxxxx") for (Root, dirs, files) in ftp.walk(Root) : #Iterate over remote file for fileName in files : …
komawak
  • 11
  • 2
1
vote
0 answers

python ftputil strange behaviour

I have a code that looks like: host = ftputil.FTPHost("ftp.example.com","anonymous","") try: os.mkdir('./ftp.example.com') except: traceback.print_exc() else: sys.stderr.write('WTF?') for root,dirs,files in…
Marcel
  • 1,266
  • 7
  • 18
1
vote
1 answer

How to pass chunk length from upload method on ftputil

In order to use the progress indicator avaliable on ftputil lib, how could i pass the chunk length? actual code: import ftputil class FileTransferUtils(object): def __init__(self, address, user, password, remote_path, port): …
thclpr
  • 5,778
  • 10
  • 54
  • 87
0
votes
0 answers

Connection error with ftputil: DH_KEY_TOO_SMALL

When I connect to an FTP server (Pure-FTPd) with ftputil, I get the following error: import ftputil from ftplib import FTP_TLS class TLSFTPSession(FTP_TLS): def __init__(self, host, userid, password): FTP_TLS.__init__(self) …
mrgou
  • 1,576
  • 2
  • 21
  • 45
0
votes
1 answer

How do I open an FTP directory so that I can use it the same way I could a normal directory?

I am trying to make an application that downloads something and puts it on an FTP server. There is not enough space to, even temporarily, put those files that are being downloaded on my computer, so I want them to download into the FTP…
0
votes
1 answer

Python ftputil outputting to terminal although I want to redirect output to a file

I'm running a Python3 script on the terminal, and on my terminal it writes out a lot of print() statements that I added, as well as output from libraries I'm using. I wish to save the output in a file, so I run the script like this. python3…
user985366
  • 1,635
  • 3
  • 18
  • 39
0
votes
1 answer

ftputil: listdir returns an empty list even though the directory is not empty

I want to use ftputil instead of ftplib in python. On a public ftp server everything works fine with both libraries: host = 'ftp.avm.de' user = 'anonymous' passwd = '' import ftputil with ftputil.FTPHost(host, user, passwd) as ftp: …
johnson
  • 3,729
  • 3
  • 31
  • 32
0
votes
1 answer

Pyqt use QThread but GUI still not responding

I tried to download file from FTP to network shared folder(file size might 500mb or bigger) but every time when clicked "Start" the GUI will show "not responding" even using QThread Did I do it wrong anything? main.py # -*- coding: utf-8 -*- from…
user1484400
  • 119
  • 1
  • 2
  • 13
0
votes
1 answer

unable to download files recursively using ftputil

I am trying to write a code which should download the files which have been created in the past 6 days. I am able to print the files but not able to download. Please suggest where i am wrong and help me complete the sript. import ftplib import…
0
votes
0 answers

unable to download files using ftputil

I am trying to download files which have been created in past 6 days, I'm able to print the names of the files but not download the files from the FTPserver to the local system. Please suggest where I'm wrong. import ftplib import ftputil import…
0
votes
1 answer

Issue with ftputil library and JPG-files

I have code shown below for root, dirs, files in ftp_host.walk(ftp_host.curdir, topdown=False): if ftp_host.path.isdir(root): for folder in ftp_host.path.normpath(root).split('/'): target_dir = os.path.join(target_dir,…
SpanishBoy
  • 2,105
  • 6
  • 28
  • 51
0
votes
0 answers

Download folder and its subfolders using FTPUtil

I want to download a file from ftp using the FTPUtil library the java API. Specifically I want to download a folder and its subfolders(if any). Is there a simple way already implemeted on the FTPUtil ? other library recommendation is also ok.…
LeTex
  • 1,452
  • 1
  • 14
  • 28