问题描述:python代码中包含paramiko模块的远程登录ssh,在用pyInstaller转为exe时报错,
报错提示为“No handlers could be found for logger "paramiko.transport"
出错位置:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
解决方案:添加一行代码,记录传输日志。
代码如下:文章地址https://www.yii666.com/article/764256.html
paramiko.util.log_to_file("log.log")
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())文章来源地址:https://www.yii666.com/article/764256.html
后面有问题可以在log日志中查看。
网址:yii666.com参考:http://stackoverflow.com/questions/19152578/no-handlers-could-be-found-for-logger-paramiko