This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: execfile() not show filename when IOErro
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nowonder Nosy List: gvanrossum, inyeol, nowonder
Priority: normal Keywords:

Created on 2002-08-23 10:16 by inyeol, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg12115 - (view) Author: Inyeol Lee (inyeol) Date: 2002-08-23 10:16
Python 2.2.1 (#1, Apr 10 2002, 18:25:16) 
[GCC 2.95.3 20010315 (release)] on sunos5
>>> try: execfile('non_existent_file')
... except IOError, msg: msg.__dict__

{'errno': 2, 'args': (2, 'No such file or directory'),
'strerror': 'No such file or directory', 'filename':

There should be a filename, not None.

-Inyeol Lee 
msg12116 - (view) Author: Peter Schneider-Kamp (nowonder) * (Python triager) Date: 2002-08-27 16:59
Logged In: YES 

execfile incorrectly called PyErr_SetFromErrno instead of

Resolution is obvious and already committed to cvs.
msg12117 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-03 19:40
Logged In: YES 

Credit where credit is due. :-)
Date User Action Args
2022-04-10 16:05:36adminsetgithub: 37075
2002-08-23 10:16:18inyeolcreate