Apr-05-2021, 07:12 PM
Thank you all! Adding the tfp.close() resolved it as I am on Windows 10.
The code is from a video Python course I am taking. The code works for the instructor in the video, and he is on Linux, or a Linux like platform. The comment about it not mattering on Linux explains it.
In the same lesson he had demonstrated tempfile.TemporaryFile just before a demo of tempfile.TemporaryDirectory.
The code is from a video Python course I am taking. The code works for the instructor in the video, and he is on Linux, or a Linux like platform. The comment about it not mattering on Linux explains it.
In the same lesson he had demonstrated tempfile.TemporaryFile just before a demo of tempfile.TemporaryDirectory.