1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Cannot execute shell command on Microsoft IIS

Discussão em 'Python' iniciado por Stack, Setembro 12, 2024.

  1. Stack

    Stack Membro Participativo

    When my Django application is hosted on IIS, this fragment of code doesn't work.

    def convert_to_pdf(input_file, output_file):
    wordfile = input_file
    command = ["soffice", "--convert-to", "pdf", wordfile, "--outdir", os.path.dirname(output_file)]
    subprocess.call(command, shell=True)


    When I try to execute the command manually on cmd it works fine. Code

    I've tried to grant all permissions to DefaultAppPool but nothing changes.

    Continue reading...

Compartilhe esta Página