Re: Spurious character in IOError exception

2011-04-28 Thread Peter Otten
loial wrote: > When I correctly trap an IOError a spurious u' appears in the file > path in the exception message : > > The path used in the code is correct i.e. /home/myfile > > But the error message says : > > [Errno 2] No such file or directory: u'/home/myfile' > > > I am simply doing > >

Spurious character in IOError exception

2011-04-28 Thread loial
When I correctly trap an IOError a spurious u' appears in the file path in the exception message : The path used in the code is correct i.e. /home/myfile But the error message says : [Errno 2] No such file or directory: u'/home/myfile' I am simply doing except IOError, e: print s