[Python] PermissionError: [WinError 5] Access is denied in Python

Discussão em 'Python' iniciado por Stack, Novembro 29, 2024.

  1. Stack

    Stack Membro Participativo

    import shutil

    def create_dir(path):
    if not os.path.exists(path):
    os.mkdir(path)
    else:
    shutil.rmtree(path)


    when I run this code it gives me permission error, even though I have access to that directory.

    Also, I use Windows and I have tried running as administrator

    Continue reading...

Compartilhe esta Página