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 pashkin
Recipients pashkin
Date 2019-08-15.07:43:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565854995.12.0.82543629972.issue37865@roundup.psfhosted.org>
In-reply-to
Content
Here is an example:

import tempfile
import os


with tempfile.NamedTemporaryFile() as temp:
    os.remove(temp.name)


And here is an error it produces:

Traceback (most recent call last):
  File "test.py", line 6, in <module>
    os.remove(temp.name)
  File "/usr/lib/python3.7/tempfile.py", line 639, in __exit__
    self.close()
  File "/usr/lib/python3.7/tempfile.py", line 646, in close
    self._closer.close()
  File "/usr/lib/python3.7/tempfile.py", line 583, in close
    unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpzn8gtiz1'
History
Date User Action Args
2019-08-15 07:43:15pashkinsetrecipients: + pashkin
2019-08-15 07:43:15pashkinsetmessageid: <1565854995.12.0.82543629972.issue37865@roundup.psfhosted.org>
2019-08-15 07:43:15pashkinlinkissue37865 messages
2019-08-15 07:43:14pashkincreate