Parsing '-d' failed: File or directory to execute does not exist

You should add the -d before the execution directory, like this:

subprocess.run(["pabot", "--testlevelsplit", "-d", log_directory, directorio_saida])
3 Likes