Python Pysftp Error

后端 未结 2 1708
既然无缘
既然无缘 2020-12-31 23:45

My code:

import pysftp 
s = pysftp.Connection(host=\'test.rebex.net\', username=\'demo\', password=\'password\') 
data = s.listdir() 
s.close() 
for i in dat         


        
2条回答
  •  遥遥无期
    2021-01-01 00:18

    That initial error appears to be a problem connecting with the remote server (SSHException). The second (AttributeError), is from a bug in the code that occurs when the connection fails. It is fixed in the latest version of pysftp

    https://pypi.python.org/pypi/pysftp

    pip install -U pysftp
    

    is your friend.

提交回复
热议问题