WindowsError [error 5] Access is denied

后端 未结 5 1022
無奈伤痛
無奈伤痛 2020-12-03 04:39

I\'m using the killableprocess package (built on top of subprocess) for running processes Whenever I run the \"killableprocess.Popen(command)\" piece of code in my script I

5条回答
  •  [愿得一人]
    2020-12-03 05:12

    I solved a similar problem I had by switching to the process directory (I was trying to use inkscape) and it solved my problem

    import subprocess
    inkscape_dir=r"C:\Program Files (x86)\Inkscape"
    assert os.path.isdir(inkscape_dir)
    os.chdir(inkscape_dir)
    subprocess.Popen(['inkscape.exe',"-f",fname,"-e",fname_png])
    

    Maybe switching to the process directory will work for you too.

提交回复
热议问题