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
10
votes
4 answers

cv2.videocapture.read() does not return a numpy array

I have this code trying to capture a frame from my webcam on raspberry pi, and saving it as an image. I use opencv 2, but I get strange errors when I run the code.. import time import sys from subprocess import call import cv2 cam =…
GrixM
  • 215
  • 2
  • 4
  • 20
9
votes
4 answers

Zipping files in python

My program runs smoothly but I want my files from ftp to be zip in my local drive The problem is only 1 file is being zipped after calling my main() function Here's my code: import os import upload import download import zipfile import…
neo
  • 293
  • 3
  • 7
  • 21
5
votes
2 answers

Python 3 replacement for ftputil?

I'm looking for an alternative to the ftputil library. Should work with python 3 and would be nice if its in the Archlinux repos. Is there any?
jgillich
  • 71,459
  • 6
  • 57
  • 85
5
votes
1 answer

Getting EOFError along with exceptions when using ftplib

I'm looking into using ftplib (and possibly ftputil) for doing some automated FTP file syncing. I have a couple of servers to test this against at the moment, but, whilst I'm having a successful conversation with both servers, I get EOFError-s with…
bdeniker
  • 995
  • 1
  • 9
  • 21
3
votes
1 answer

Time of last file modifcation returns a one year offset since DST change

To get the modification time of a file I use path.getmtime from ftputil, but since the DST-change the returnvalue of recently created files has an offset of one year, saying the last modification time of new files is from last year. Actually the…
NoWater
  • 33
  • 2
3
votes
1 answer

Issue while uploading file with ftputil

I am struggling to upload file to my FTP server. Please advise what is wrong in code below: host: someserver.com path: ./my_folder/at_this_server target: 'test.pdf' with ftputil.FTPHost(ftp_settings['host'], …
SpanishBoy
  • 2,105
  • 6
  • 28
  • 51
3
votes
1 answer

How to pass chunk length from upload method to streaming content?

In my Flask project I use ftputil library. In one of the application sections I use content streaming as described in Flask documentation: @app.route('/section') def section(): def generate(): ftp.upload(source, target, "b", callback) …
VisioN
  • 143,310
  • 32
  • 282
  • 281
2
votes
0 answers

Python: How to open files through Ftp with UTF-8/Unicode name?

I want to connect to an FTP server and get files and iterate through items with python. but folder names are Persian/Arabic and when I want to open any folder it returns this : error_perm: 550 The filename, directory name, or volume label syntax…
hossein hayati
  • 1,088
  • 2
  • 15
  • 34
2
votes
2 answers

How to install ftputil for Odoo?

I have been trying to install a module from this link https://github.com/camptocamp/connector-file/tree/master/connector_file. But when i am trying to install it, i am getting the following error : Unable to install module "connector_file" because…
Shravy
  • 656
  • 1
  • 23
  • 61
2
votes
4 answers

Misleading global variable

I have an exercise and it is now good and running. The algo of this exercise is to download files from FTP server zip it and upload it again in the upload folder in the FTP server again. BTW this is my code: import os import zipfile import…
neo
  • 293
  • 3
  • 7
  • 21
2
votes
2 answers

Error Handling in python

I need to create a program that will download files from FTP Server and zip it and upload it to the upload folder in FTP Server. My old code is good but my instructor requested that I should organize my code into logical functions and after…
neo
  • 293
  • 3
  • 7
  • 21
2
votes
1 answer

python script to recursively search FTP for specific filename and newer than 24 hours

Our storage area ran into trouble with SMB connections and now we have been forced to use FTP to access files on a regular basis. So rather than using Bash, I am trying to use python but I am running into a few problems. The script needs to…
JRM
  • 187
  • 7
  • 20
1
vote
1 answer

why won't recursive ftp work in this directory?

Python newb...beware! I am trying to recursively ftp some files. In the script below, I get an error: Traceback (most recent call last): File "dump.py", line 7, in for root,dirs,files in recursive: File…
usr951
  • 73
  • 1
  • 6
1
vote
0 answers

ftputil package using for ftp backup from odoo

I'm trying to get a database backup from odoo erp using ftputil this is the code # -*- coding: utf-8 -*- from odoo import models, fields, api, tools, _ from odoo.exceptions import Warning import odoo from odoo.http import…
1
vote
2 answers

Need to connect to ftp through the ftputil module, open an existing file with records and add new records to the end of those records

I used the ftputil module for this, but ran into a problem that it doesn't support 'a'(append) appending to the file, and if you write via 'w' it overwrites the contents. That's what I tried and I'm stuck there: with ftputil.FTPHost(host, ftp_user,…
1
2 3