zackmawaldi / YouTube-shorts-generator

Automatically download Reddit videos, edit them, and upload them to YouTube.
MIT License
323 stars 62 forks source link

The process cannot access the file because it is being used by another process #26

Closed Ukosent closed 1 year ago

Ukosent commented 1 year ago

I get this message when executing the script a few times in a row: "An error occurred in main() on attempt 1: [WinError 32] The process cannot access the file because it is being used by another process: 'temp_clips\main_clip.mp4' -> 'temp_clips\output.mp4'"

Since I am a frenchie this is my console's actual text:

An error occurred in main() on attempt 1: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' -> 'temp_clips\\output.mp4' An error occurred in main() on attempt 2: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 3: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 4: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 5: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 6: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 7: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 8: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 9: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' An error occurred in main() on attempt 10: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'temp_clips\\main_clip.mp4' Attempted to upload 10 times with no luck... ending script.

casperrr commented 1 year ago

yup got this too. It doesnt seem to happen on all videos. Ive noticed it happen to me when the video is of a similar aspect ratio to what it should be converted to. eg a video thats been reuploaded from something like tiktok to reddit.

zackmawaldi commented 1 year ago

Yea... the project is unpredictably bugging sometimes. I made the retry element more robust so when it comes across a failed video, it won't repeat it. Let me know if it continues to happen in this latest version. Thank you!

Ukosent commented 3 months ago

yup got this too. It doesnt seem to happen on all videos. Ive noticed it happen to me when the video is of a similar aspect ratio to what it should be converted to. eg a video thats been reuploaded from something like tiktok to reddit.

have you found a solution to this problem please ? I just tried reusing the bot and I have the same issue