[Python] No such file or directory: 'c:\\securityrule\\acnt.lyb' the writing file [duplicate]

Discussão em 'Python' iniciado por Stack, Fevereiro 3, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to save a file in the root directory in C: but it gives me the error [Errno 2] No such file or directory

    filepath = r"c:\securityrule\acnt.lyb"
    file = open(filepath, "w")
    file.write(str(data))
    file.close()

    Continue reading...

Compartilhe esta Página