You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently running into this error when calling getfo on files that exist on the remote server. It seems to fail during CMD_STAT requests when the file is already opened for reading, but the same CMD_STAT will work if I manually call it without opening the file first. I imagine this is probably related to the configuration of the sftp server I'm connecting to, but I figured I should file an issue ayway.
In [43]: with sftpc.open('[removed]', 'rb') as fr:
....: sftpc._request(CMD_STAT, '[removed]')
....:
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-43-b71244708fe4> in <module>()
1 with sftpc.open('[removed]', 'rb') as fr:
----> 2 sftpc._request(CMD_STAT, '[removed]')
3
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/paramiko/sftp_client.pyc in _request(self, t, *arg)
727 def _request(self, t, *arg):
728 num = self._async_request(type(None), t, *arg)
--> 729 return self._read_response(num)
730
731 def _async_request(self, fileobj, t, *arg):
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/paramiko/sftp_client.pyc in _read_response(self, waitfor)
774 # synchronous
775 if t == CMD_STATUS:
--> 776 self._convert_status(msg)
777 return t, msg
778 if fileobj is not type(None):
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/paramiko/sftp_client.pyc in _convert_status(self, msg)
800 elif code == SFTP_NO_SUCH_FILE:
801 # clever idea from john a. meinel: map the error codes to errno
--> 802 raise IOError(errno.ENOENT, text)
803 elif code == SFTP_PERMISSION_DENIED:
804 raise IOError(errno.EACCES, text)
IOError: [Errno 2] The message [[removed]] is not extractable!
In [44]: sftpc._request(CMD_STAT, '[removed]')
Out[44]:
(105,
paramiko.Message('\x00\x00\x00.....'))
The text was updated successfully, but these errors were encountered:
ryanahall
changed the title
'The message [...] is not extractable!' on calls to get/getfo
'The message [...] is not extractable!' on calls to getfo
May 21, 2015
Thanks for the detailed description, greatly appreciated!
Feels related to (or dupe of?) #194 - going to close this assuming it's the same issue, and make sure it is noted over there as this seems to go into it deeper than previously.
I'm currently running into this error when calling getfo on files that exist on the remote server. It seems to fail during CMD_STAT requests when the file is already opened for reading, but the same CMD_STAT will work if I manually call it without opening the file first. I imagine this is probably related to the configuration of the sftp server I'm connecting to, but I figured I should file an issue ayway.
Here's two manual calls of CMD_STAT on the same server/file, one with it already opened and the other not. getfo() uses the first approach of opening and then calling stat() seen here: https://github.com/paramiko/paramiko/blob/master/paramiko/sftp_client.py#L688-L689
The text was updated successfully, but these errors were encountered: