Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename: inwindows xp while making tarfile

Reply
Thread Tools

Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename: inwindows xp while making tarfile

 
 
Ryniek90
Guest
Posts: n/a
 
      08-24-2009

>> John Machin wrote:
>>
>>> Erik Max Francis <max <at> alcyone.com> writes:
>>>

>
>
>> 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.
>>

>
> The "pipe" character is not a valid character in a Windows file.
> Despite the OP's message wrapping the filename in "pipes",
> there are no pipes in the filename in the traceback to
> which he posted a link. Wrapping the filename in "pipes"
> and the cryptic reference to "the '|\U' literal fault"
> appear to be side-issue bogglements.
>
> >>> open('boggle|txt', 'wb')

> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> IOError: [Errno 22] invalid mode ('wb') or filename: 'boggle|txt'
> >>> open('|boggle.txt|', 'wb')

> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> IOError: [Errno 22] invalid mode ('wb') or filename: '|boggle.txt|'
>
>
>
>


Sorry, but i don't know where those pipes came from : P

The proper path is "C:\\Users\\Ryniek's
WinSe7en\\MyNewGGBackup(2009-08-23 14:59:02).tar.bz2"
and that string literal is "\U", without any pipes

The truth is that script works on linux (ubuntu) but not on windows
(neither Win7 nor WinXP).
Maybe it's good idea to use raw string for specifing those paths?

As i mentioned later, some python users had the same problem with this
IOError ( like here: http://www.daniweb.com/forums/thread174552.html or
here:
http://groups.google.com/group/sympy...2aca3eb532928c
).


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TypeError: _getfullpathname() argument 1 must be (buffer overflow),not str in windows xp, while making tarfile Ryniek90 Python 0 08-25-2009 09:22 PM
TypeError: _getfullpathname() argument 1 must be (buffer overflow),not str in windows xp, while making tarfile Ryniek90 Python 0 08-25-2009 02:37 PM
Re: Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename:in windows xp while making tarfile Tim Golden Python 6 08-25-2009 12:29 PM
Re: Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename:in windows xp while making tarfile Dave Angel Python 0 08-24-2009 02:36 PM
IOError: [Errno 22] invalid mode ('wb') or filename: in windowsxp while making tarfile Ryniek90 Python 3 08-24-2009 02:10 AM



Advertisments