Github python script hanging: "WindowsError: [Error 2] The system cannot find the file specified"

Github python script hanging: "WindowsError: [Error 2] The system cannot find the file specified"

我是 运行 一个从数据库导出 xml 的 python script,将记录转换为 PDF,然后尝试上传 xml 和 pdf 文件到 github 存储库。导出和 pdf 转换工作正常,但过程随后挂起并输出以下错误消息:

Traceback (most recent call last):
File "asExportIncremental.py", line 394, in <module>
main()
File "asExportIncremental.py", line 320, in main
gitPush()
File "asExportIncremental.py", line 308, in gitPush
repo.push()
File "C:\Python27\lib\site-packages\gittle\gittle.py", line 343, in push
return self.push_to(origin_uri, branch_name, progress)
File "C:\Python27\lib\site-packages\gittle\gittle.py", line 338, in push_to
progress=progress
File "C:\Python27\lib\site-packages\dulwich\client.py", line 440, in send_pack
proto, unused_can_read = self._connect('receive-pack', path)
File "C:\Python27\lib\site-packages\dulwich\client.py", line 893, in _connect
port=self.port, username=self.username)
File "C:\Python27\lib\site-packages\dulwich\client.py", line 758, in run_command
stdout=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

我的问题是我不确定脚本在哪里失败。 "WindowsError: [Error 2] The system cannot find the file specified" 指的是哪个文件?我如何解决它?谢谢!

脚本调用 gittle(高级 python git 库)执行 dulwich(低级 python git 包装器) runs ssh 失败了。 ssh.exe 似乎不在您的 PATH 中。