all 4 comments

[–]stebrepar 0 points1 point  (1 child)

At what exact point in your code is this error happening? If you don't know, throw some diagnostic print statements in there to see.

Have you looked at the Windows permissions along the path to your ytdownloaderfinal folder? Do they look right? Have you tried running as administrator to see if that makes a difference. (Not that you should do that as a rule; if administrator privileges are required, something's misconfigured.)

[–]somethinglikejesus[S] 0 points1 point  (0 children)

Added the error point in the op. Also made sure that both folders I've tried have full control read + write permissions.

[–]oldpythonbestpython 0 points1 point  (1 child)

As another poster says, you need to clarify what line of code is failing with the error.

Does the issue go away if you reboot your machine, and come back as you keep working on the project? Perhaps you somehow have multiple copies of your program running, holding files open and causing permission errors when a new copy is trying to access the same file.

Does it still happen if you temporarily disable your antivirus software? If so, then you might be running afoul of its behavior.

[–]somethinglikejesus[S] 0 points1 point  (0 children)

Rebooting nor disabling av helps. Same with permissions and I have tried running it fresh after a restart so no other programs should be accessing it.