Apr-05-2021, 06:12 PM
In other words, there is not a problem with line 10 other than it being the last line of the context created by this:
Why aren't you using TemporaryFile() instead of TemporaryDirectory()?
with tempfile.TemporaryDirectory() as tdp:When your program finishes line 10 it exits the context defined for tdp and calls the exit function. The exit function deletes the directory, unsuccessfully.
Why aren't you using TemporaryFile() instead of TemporaryDirectory()?