0

我正在运行一个python 脚本,它从数据库中导出 xml,将记录转换为 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”指的是哪个文件?我如何解决它?谢谢!

4

1 回答 1

1

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

于 2018-01-16T19:20:19.897 回答