git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pysftp / paramiko problem


On 13/06/2019 18:23, MRAB wrote:
.........
>>
> What does:
> 
> sftp.normalize('.')
> 
> return?

It returns '/'.

sftp.chdir('XXXX') and that also fails in paramiko as it seems to use CMD_REALPATH to do that.

>   File "tsftp.py", line 7, in main
>     print(sftp.chdir('XXXX'))
>   File "/home/rptlab/tmp/tpy3/lib/python3.6/site-packages/pysftp/__init__.py", line 524, in chdir
>     self._sftp.chdir(remotepath)
>   File "/home/rptlab/tmp/tpy3/lib/python3.6/site-packages/paramiko/sftp_client.py", line 662, in chdir
>     self._cwd = b(self.normalize(path))
>   File "/home/rptlab/tmp/tpy3/lib/python3.6/site-packages/paramiko/sftp_client.py", line 632, in normalize
>     t, msg = self._request(CMD_REALPATH, path)
>   File "/home/rptlab/tmp/tpy3/lib/python3.6/site-packages/paramiko/sftp_client.py", line 813, in _request
>     return self._read_response(num)
>   File "/home/rptlab/tmp/tpy3/lib/python3.6/site-packages/paramiko/sftp_client.py", line 865, in _read_response
>     self._convert_status(msg)
>   File "/home/rptlab/tmp/tpy3/lib/python3.6/site-packages/paramiko/sftp_client.py", line 894, in _convert_status
>     raise IOError(errno.ENOENT, text)
> FileNotFoundError: [Errno 2] No such file.

-- 
Robin Becker