Open
Description
I've recently seen an error like below pop up a few times in Windows CI:
Traceback (most recent call last):
File "C:\actions-runner\_work\vision\vision\pytorch\vision\test\datasets_utils.py", line 531, in test_feature_types
with self.create_dataset(config) as (dataset, _):
File "C:\Jenkins\Miniconda3\envs\ci\lib\contextlib.py", line 142, in __exit__
next(self.gen)
File "C:\actions-runner\_work\vision\vision\pytorch\vision\test\datasets_utils.py", line 617, in create_dataset
with super().create_dataset(
File "C:\Jenkins\Miniconda3\envs\ci\lib\contextlib.py", line 142, in __exit__
next(self.gen)
File "C:\actions-runner\_work\vision\vision\pytorch\vision\test\datasets_utils.py", line 371, in create_dataset
with get_tmp_dir() as tmpdir:
File "C:\Jenkins\Miniconda3\envs\ci\lib\contextlib.py", line 142, in __exit__
next(self.gen)
File "C:\actions-runner\_work\vision\vision\pytorch\vision\test\common_utils.py", line 47, in get_tmp_dir
shutil.rmtree(tmp_dir)
File "C:\Jenkins\Miniconda3\envs\ci\lib\shutil.py", line 750, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Jenkins\Miniconda3\envs\ci\lib\shutil.py", line 615, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Jenkins\Miniconda3\envs\ci\lib\shutil.py", line 615, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Jenkins\Miniconda3\envs\ci\lib\shutil.py", line 615, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
[Previous line repeated 2 more times]
File "C:\Jenkins\Miniconda3\envs\ci\lib\shutil.py", line 624, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "C:\Jenkins\Miniconda3\envs\ci\lib\shutil.py", line 622, in _rmtree_unsafe
os.rmdir(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpruvdnq3j\\FlyingThings3D\\frames_cleanpass\\TRAIN\\B\\0001'
This can happen on Windows if we open a file, but not close it before the test ends. We have a patch for PIL images to always load them properly
Lines 623 to 643 in 4125d3a
Meaning, either that doesn't work or another file type is causing this.
cc @peterjc123 @nbcsm @guyang3532 @maxluk @gunandrose4u @mszhanyi @seemethere