should close file after upload
Even though the comment of SetContentFile mentions that the content will be closed in upload, but it does not happen.
If you are still encountering this issue, please provide more information, and how to reproduce the issue.
These can be safely ignored - python still closes the files and SSL sockets after using them. They were just not explicitly closed.
I am having the same issue, where the file is not closed hence unable to remove it. Here is the problem I am having: https://stackoverflow.com/questions/60132814/pydrive-upload-and-remove?noredirect=1#comment106369915_60132814 how did you overcome it?
@GaryLu889 if you use file.SetContentFile(path) you can try to do file.content.close in the finally block. Please, let me know if that helps.
@shcheklein Thank you so much, it works like a charm,
@GaryLu889 awesome! reopening this, since it can and should be handled on the PyDrive side.