Message 337559 - Python tracker

Message337559

Author Geoff.Alexander
Recipients Geoff.Alexander, paul.moore, steve.dower, steven.daprano, tim.golden, zach.ware
Date 2019-03-09.07:06:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552115211.7.0.710450689695.issue36243@roundup.psfhosted.org>
In-reply-to
Content
This problem does not appear to be a race condition ("Time Of Check To Time Of Use" bug) in my case as the directory in question exists both before and after the os.listdir call.

I got a workaround saying to wrap the os.listdir call in try/except in my Stack Overflow question at https://stackoverflow.com/questions/55067904/python-os-listdir-fails-with-filenotfounderror-when-directory-exists.  This worked as no longer got any spurious FileNotFound exceptions.

I realize that the code snippet I gave is not runnable.  I'll look to put together a small example illustrating the problem and add to the issue.
History
Date User Action Args
2019-03-09 07:06:51Geoff.Alexandersetrecipients: + Geoff.Alexander, paul.moore, tim.golden, steven.daprano, zach.ware, steve.dower
2019-03-09 07:06:51Geoff.Alexandersetmessageid: <1552115211.7.0.710450689695.issue36243@roundup.psfhosted.org>
2019-03-09 07:06:51Geoff.Alexanderlinkissue36243 messages
2019-03-09 07:06:51Geoff.Alexandercreate