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 Ilya.Kulakov
Recipients Ilya.Kulakov
Date 2015-07-23.22:51:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1437691863.88.0.795764975498.issue24699@psf.upfronthosting.co.za>
In-reply-to
Content
I'm seeing the issue using python 3.4.3 on Windows 8

In the __init__.py method of my package I define temporary directory at the module level like this:

_TempDir = tempfile.TemporaryDirectory(prefix='...'))
tempfile.tempdir = _TempDir.name


I expect it to be deleted on exit.

However, _sometimes_, I'm seeing the following exception on exit:

Traceback (most recent call last):
  File ":/weakref.pyo", line 582, in _exitfunc
  File ":/weakref.pyo", line 506, in __call__
  File ":/tempfile.pyo", line 674, in _cleanup
  File ":/shutil.pyo", line 478, in rmtree
  File ":/shutil.pyo", line 360, in _rmtree_unsafe
  File ":/shutil.pyo", line 358, in _rmtree_unsafe
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\
Users\\BC79~1\\AppData\\Local\\Temp\\..._s9wqmyo_'
History
Date User Action Args
2015-07-23 22:51:03Ilya.Kulakovsetrecipients: + Ilya.Kulakov
2015-07-23 22:51:03Ilya.Kulakovsetmessageid: <1437691863.88.0.795764975498.issue24699@psf.upfronthosting.co.za>
2015-07-23 22:51:03Ilya.Kulakovlinkissue24699 messages
2015-07-23 22:51:03Ilya.Kulakovcreate