IOError: [Errno 22] invalid mode ('wb') or filename: in windows xp while making tarfile
Erik Max Francis
max at alcyone.com
Sun Aug 23 16:14:41 EDT 2009
Ryniek90 wrote:
> I've got my backup script which opens tarfile for add chosen file to it.
> But while setting it up, i've got Traceback:
> here's the url: -->http://paste.ubuntu.com/258081/<--
>
> I have searched among google's result but didn't found anything useful.
> Only found info that it may be the backslashes fault in path, but i have
> written proper the path.
>
> Here's link to my script paste: http://paste.ubuntu.com/258087/
>
> Is its the '|\U' literal fault in path '|C:\\Users\\Ryniek's
> WinSe7en\\MyNewGGBackup(2009-08-23 14:59:02).tar.bz2|' ?
>
> Sorry if i'm annoying but i'm still learning.
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.
You want to make sure to always escape your backslashes (or use raw
strings), too, or that's going to bite you sometime later (but it's not
your main problem here).
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Every human being is a problem in search of a solution.
-- Ashley Montague
More information about the Python-list
mailing list