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

MRAB python at mrabarnett.plus.com
Tue Aug 25 18:05:01 EDT 2009


Ryniek90 wrote:
>>
>> Ryniek90 wrote:
[snip]
>>> 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:
[snip]
> 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