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:51 | Geoff.Alexander | set | recipients: + Geoff.Alexander, paul.moore, tim.golden, steven.daprano, zach.ware, steve.dower |
| 2019-03-09 07:06:51 | Geoff.Alexander | set | messageid: <1552115211.7.0.710450689695.issue36243@roundup.psfhosted.org> |
| 2019-03-09 07:06:51 | Geoff.Alexander | link | issue36243 messages |
| 2019-03-09 07:06:51 | Geoff.Alexander | create | |