Closed TManzini closed 1 year ago
Hi @TManzini!
Thank you for your pull request and welcome to our community.
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!
Thanks for the PR @TManzini
Could you provide more context on the permission issue (e.g. any links)?
Sure, unfortunately the details around this behavior are poorly documented, but here is the trail that I followed to arrive at the PR.
When running the process_video script I kept getting PermissionError: [WinError 5] Access is denied: <PATH_TO_WIP_DIR> -> <PATH_TO_DONE_DIR>
So the suggestion is to continuously retry the rename for a certain amount of time until the OS realizes the rename is okay, or it times out. I set 10s as an arbitrary number. This behavior only seems to occur on windows.
Thanks for the context! Lets narrow the hack to the windows platform only.
@TManzini If you could sign the CLA above, I'm happy to merge the PR to a branch and I will fix some minor issues there.
Let me know if you are happy with this implementation
This fix will attempt to rename the temporary folder for 10sec. This is due to an issue on windows machines that causes the renaming of the temporary folder to result in a PermissionError for several seconds after the last image is written.