Misleading error message when opening a file (on Windows XP SP 2)

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Mon Aug 28 04:35:49 EDT 2006


In <ecu65e$12o$1 at newsreader2.netcologne.de>, Claudio Grondi wrote:

> 
> Here an example of what I mean
> (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte 
> large file):
>
>  >>> f = file('veryBigFile.dat','r')
>  >>> f = file('veryBigFile.dat','r+')

You mention the file size and gave a "speaking" name to that file -- does
the file size matter?

> Traceback (most recent call last):
>    File "<pyshell#1>", line 1, in -toplevel-
>      f = file('veryBigFile.dat','r+')
> IOError: [Errno 2] No such file or directory: 'veryBigFile.dat'
> 
> Is it a BUG or a FEATURE?

It's the error number Windows returns for that operation.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list