ReadError, "not a bzip2 file"
itzel
isalazar80 at yahoo.com.mx
Wed Sep 13 17:38:37 EDT 2006
Hello!!
In using tarfile to group thousands of small files from a directory and
then compress it. I already compress a group of files in my pc, but I
need do it in a server and I'm testing the same procedure, but it
doesn't work . A "ReadError" appear: "not a bzip2 file". I'm using this
script:
import os
import tarfile
dstfolder = '/somepath/to/output' ## server
fileorfoldertobackup = '/home/username' ## server
dst = '%s.tar.bz2' % os.path.join(dstfolder,
os.path.basename(fileorfoldertobackup))
out = tarfile.TarFile.open(dst, 'w:bz2')
out.add(fileorfoldertobackup,
arcname=os.path.basename(fileorfoldertobackup))
out.close()
What I´m doing wrong? Is necesary install a python version into the
server??
Thanks!!
More information about the Python-list
mailing list