IOError: [Errno 22] invalid mode ('wb') or filename: in windows xp while making tarfile
Dave Angel
davea at ieee.org
Sun Aug 23 21:32:13 EDT 2009
John Machin wrote:
> Erik Max Francis <max <at> alcyone.com> writes:
>
>
>> Ryniek90 wrote:
>>
>
>
>>> Is its the '|\U' literal fault in path '|C:\\Users\\Ryniek's
>>> WinSe7en\\MyNewGGBackup(2009-08-23 14:59:02).tar.bz2|' ?
>>>
>
> What is "the '|\U' literal fault" ???
>
>
>> It's probably a misleading error from the OS; I would guess the problem
>> is that the filename contains colons, which I believe is a no-no on Windows.
>>
>
> The colons are the problem. The error message is not from the OS; it is
> concocted by Python (see fileobject.c) as what appears to be the best possible
> text given vague error reporting by Windows. I don't understand "probably a
> misleading error [message]" -- invalid mode (actual value) or filename ->
> invalid something-obviously-not-invalid or filename -> invalid filename
>
>
>
I also suspect the "pipe" symbol. I don't know if it's an invalid
character to Windows, but it's certainly a bad idea. The '|' character
means something special to the shell.
DaveA
More information about the Python-list
mailing list