TypeError: _getfullpathname() argument 1 must be (buffer overflow), not str in windows xp, while making tarfile

MRAB python at mrabarnett.plus.com
Wed Aug 26 00:05:01 CEST 2009

Ryniek90 wrote:
>> Ryniek90 wrote:
>>> Here's my script code:
>>> *http://paste.ubuntu.com/259310/
>>> *Shouldn't that bug be patched already  :-?
>> Are you giving it the contents of the file when it's actually expecting
>> the filename?
> Of course the content of the file:
> See? *backup_obj.add(read_obj.read())*
> In previous pasted Traceback you can see *backup_obj.add(read_bin_obj)* 
> - read_obj_bin was a reference to the *read_obj.read()* .
The documentation lists the methods "add" and "addfile". Pick one and
provide the values it's expecting. For example, if you choose "add" then
provide the filename, not the contents of the file.

> Do only I have this problem or Python programming under Windows is 
> nightmare?

It's only a nightmare if you don't follow the documentation. :-)

More information about the Python-list mailing list