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.

Author terry.reedy
Recipients kamisky, python-dev, roger.serwy, sanad, serhiy.storchaka, terry.reedy
Date 2015-08-17.01:08:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
From msg248192 (Serhiy - which 
>  File "/home/serhiy/py/cpython/Lib/idlelib/", line 899, in update_recent_files_list
>    if '\0' in path or not os.path.exists(path[0:-1]):
>  File "/home/serhiy/py/cpython/Lib/", line 19, in exists
>    os.stat(path)
> UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001d53c' in position 22: ordinal not in range(256)

On Windows, os.stat(astralpath) raises
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'as\'
and os.path.exists(astralpath) catches the exception and returns False. It is a linux issue, and perhaps a bug, that os.path.exists does not catch the exception. To me, as I read the docstring, it should always return True or False, with the latter the default, for any input string.

The EditorWindow line is testing for 'badfiles' to be excluded from the recent files list.  We can work around the linux behavior with try-except.
Date User Action Args
2015-08-17 01:08:24terry.reedysetrecipients: + terry.reedy, roger.serwy, python-dev, serhiy.storchaka, kamisky, sanad
2015-08-17 01:08:23terry.reedysetmessageid: <>
2015-08-17 01:08:23terry.reedylinkissue23672 messages
2015-08-17 01:08:22terry.reedycreate