'name is too long' (tarfile, python 2.2, Debian Woody)

Lars Behrens Spam.Buster at web.de
Wed Aug 20 03:52:02 EDT 2003


Hi, Pythonistas!

I'm quite new to Python and have a problem with a simple backup script.

This code:

  tar = tarfile.open('/home/lars/test.tar.gz', 'w:gz')
  tar.addfile('/home/lars')

brings up the following error message:

**********************************************************************
/usr/lib/python2.2/site-packages/tarfile.py in addfile(self, tarinfo, 
fileobj)
    1289
    1290                 if not prefix or len(name) > LENGTH_NAME:
-> 1291                     raise ValueError, "name is too long (>%d)" \
    1292                                       % (LENGTH_NAME)
    1293

ValueError: name is too long (>100)
**********************************************************************

Any hints for me?

Thanks in advance
Lars





More information about the Python-list mailing list