python子进程SVN更新FileNotFoundError

问题描述 投票:0回答:1

下面是一段导致错误的python代码。有人可以帮助解决之前可能遇到过这个问题的解决方案吗?

>>> from subprocess import call
>>> call("svn update C:/folder1/subfoler1/ --non-interactive -q")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python34\lib\subprocess.py", line 537, in call
    with Popen(*popenargs, **kwargs) as p:
  File "D:\Python34\lib\subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "D:\Python34\lib\subprocess.py", line 1112, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified```

I have gone through various other posts on similar issue but nothing related to svn update call. I haven't tried adding shell=True as this wasn't the best solution as suggested by many in this forum that it might be a security issue.
python-3.x svn subprocess
1个回答
0
投票

找到解决方案:我没有在系统上安装SVN命令行工具。子进程无法调用SVN命令。

© www.soinside.com 2019 - 2024. All rights reserved.