'The message [...] is not extractable!' on calls to getfo #530

ryanahall opened this Issue May 21, 2015 · 1 comment


None yet

2 participants


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

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]')

/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)
    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]')
@ryanahall ryanahall changed the title from 'The message [...] is not extractable!' on calls to get/getfo to '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.

@bitprophet bitprophet closed this May 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment