下面是一段导致错误的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.
答案 0 :(得分:0)
找到了解决方案:我没有在系统上安装SVN命令行工具。子进程无法调用SVN命令。