shutil cleanup sometimes fails on python 3.8
See original GitHub issueis this an upstream problem or would you be able to catch this? Our tests are marked as failures when this happens …
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.8.13/x64/bin/green", line 8, in <module>
sys.exit(main())
File "/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/site-packages/green/cmdline.py", line 88, in main
return _main(argv, testing)
File "/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/tempfile.py", line 827, in __exit__
self.cleanup()
File "/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/tempfile.py", line 831, in cleanup
self._rmtree(self.name)
File "/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/tempfile.py", line 813, in _rmtree
_shutil.rmtree(name, onerror=onerror)
File "/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/shutil.py", line 722, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/shutil.py", line 720, in rmtree
os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/tmp/tmpelefosle'
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
poetry add/update/install can fail on Windows during temp ...
It can fail for a variety of reasons, but very commonly it's simply a process holding the file active for just a little...
Read more >os.mkdir can fail with PermissionError after successful shutil ...
The problem seems to be in the Windows filesystem API functions (and not in the Python os module): deleted folders seem not to...
Read more >Changelog — Python 3.8.14 documentation
bpo-42782: Fail fast in shutil.move() to avoid creating destination directories on failure. bpo-37193: Fixed memory leak in socketserver.ThreadingMixIn ...
Read more >Changelog — Python 3.11.1 documentation
gh-83004: Clean up refleak on failed module initialisation in _io . gh-98897: Fix memory leak in math.dist() when both points don't have the ......
Read more >List of issues - Python tracker - Python.org
1438480, 7 months ago, shutil.move raises OSError when copystat fails, has patch, open, piman. (no dependencies set) shutil_copytree_doc.patch.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@CleanCut excellent - since the CI picks up the latest green anyway we might see the warning sooner or later. If i spot in the logs I’ll let you know.
Green 3.4.3 (just released) treats the inability to clean up a temp directory that it created as a warning instead of a crash…I hope. I couldn’t find a sane way to test this.