Questions tagged [ftplib]

ftplib — FTP protocol client under Python programming language

ftplib is a python module which defines the class FTP and a few related items.

The FTP class implements the client side of the FTP protocol. You can use this to write Python programs that perform a variety of automated FTP jobs, such as mirroring other ftp servers. It is also used by the module urllib.request to handle URLs that use FTP. For more information on FTP (File Transfer Protocol), see Internet RFC 959.

Read more about ftplib at python docs..

681 questions
-1
votes
1 answer

FTPLIB error socket.gaierror: [Errno 8] nodename nor servname provided, or not known

I'm trying to download a file from an FTP server using FTPlib but i keep getting the error below. I tried several methods found on SO namely editing the etc/host file and adding the computer name after the local host IP but that doesnt work…
K.ahmed104
  • 21
  • 1
  • 5
-1
votes
1 answer

connect to ftp and download file

I'm trying to download specific file from ftp but I get error while trying to connect import ftplib url = 'ftp://ftp.ensemblgenomes.org/pub/release-41/bacteria//fasta/bacteria_176_collection/_bacillus_aminovorans/cdna/' ftp = ftplib.FTP(url) error…
xyz
  • 306
  • 3
  • 11
-1
votes
1 answer

access an ftp directory with ftplib python

i'm trying to access an ftp library using a python script the address of the library is something like this: ftp://XX.XXX.XXX.XXX/ so i used this code from pythonforbegginers : import ftplib ftp = ftplib.FTP('ftp.sunet.se', 'anonymous',…
Adam
  • 1
-1
votes
1 answer

Keep change to different hash md5

import ftplib import hashlib import httplib import pytz import datetime localtime = datetime.datetime.now(pytz.timezone('Asia/Singapore')).isoformat() cam = "hi5" lscam = localtime + cam ftp =…
Kevin Kai
  • 139
  • 1
  • 1
  • 12
-1
votes
3 answers

NameError: name 'ftplip' is not defined

Following is my python code to make a FTP connection upload_ftp.py import ftplib ftp = ftplip.FTP() ftp.connect('ip', 21) print ftp.getwelcome() try: print "Logging in..." ftp.login("username", "password") except: "failed to login" but…
amit_183
  • 961
  • 3
  • 19
  • 36
-1
votes
1 answer

Python: ftplib slow on upload

I am having problems with the python script I am running on my Raspberry Pi. When I get to a 'ftp.storbinary' line the upload takes longer than when just in a simple upload program. I was wondering if there is a command that would start the upload,…
-1
votes
1 answer

Python and wxpython how to use a button to download a file from ftp

okay right now i am using ftp to download a file for my application but the problem is the code as it stands downloads the files when i launch the program and does nothing when i click the download button # Handlers for MainFrameBase events. def…
raziel23x
  • 71
  • 1
  • 8
-1
votes
2 answers

Python FTP hangs in callback

I'm using ftplib to create a simple script to push out a file to multiple IP addresses, all set up as FTP servers. I wanted to display progress in the file upload process, but I'm having an issue. I use the callback argument of FTP.storbinary() and…
Jaws212
  • 750
  • 2
  • 7
  • 18
-1
votes
1 answer

Video Appears Corrupted on Upload via Python ftplib

I'm attempting to use the ftplib library in Python to try and FTP some videos to my website. I've got a script with the basics "working", but there's a problem with it. When I try to play my video back using VLC player, it appears that it's corrupt,…
Devin
  • 996
  • 2
  • 8
  • 19
-2
votes
1 answer

Python ftplib Delete Folder and Files Script (with hidden files)

I have prepared a simple python script to delete all directories and files (with hidden files) and sharing you. You can use it or develop it.
İsmet
  • 95
  • 3
  • 12
-2
votes
1 answer

ERROR installing ftplib package on Ubuntu

I want to install the ftplib package on Ubuntu, but I got the following error! ubuntu@ubuntu:~$ sudo pip3 install ftplib **ERROR: Could not find a version that satisfies the requirement ftplib (from versions: none) ERROR: No matching distribution…
abdo_ch
  • 1
  • 2
-2
votes
1 answer

Downloading Files from FTP server which is updated in last n hours

My requirement is to download the files which are arrived in the root directory in the last 24 hours. The code below is working in a subdirectory (let's say ftp.cwd("/Landing/") but trigger the error while I am changing to the root…
SaQuiB
  • 67
  • 1
  • 7
-2
votes
1 answer

How do I decode FTP file read from BytesIO

I am trying to read the contents of text files on an FTP server, my code can make a connection and list all files present in the directory. However, it is failing here: from io import BytesIO import os r = BytesIO() ftp.retrbinary("RETR " +…
EcSync
  • 842
  • 1
  • 6
  • 20
-2
votes
1 answer

How to put password with "\n" inside in any python ftp connection?

I have an interesting problem - I need to connect to an FTP/SFTP server from Python3 code, but the password contains \n symbol inside. When I paste the password in the FTP/SFTP bash client, it works. But if I use pysftp or ftplib, authentification…
V.Kuimov
  • 1
  • 4
-2
votes
1 answer

FTP download - not saving

I have a script to download CSV files from a FTP server. I have tested the script now several time. And from PyCharm there are coming no Error. It is going trough as "processed". But the problem is that it is not saving/downloading the files. I can…
Bjorn ten Broeke
  • 135
  • 1
  • 3
  • 10
1 2 3
45
46