Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

ryanahall opened this issue May 21, 2015 · 1 comment

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

ryanahall opened this issue May 21, 2015 · 1 comment


Copy link

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:

In [43]: with'[removed]', 'rb') as fr:
   ....:     sftpc._request(CMD_STAT, '[removed]')
IOError                                   Traceback (most recent call last)
<ipython-input-43-b71244708fe4> in <module>()
      1 with'[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 'The message [...] is not extractable!' on calls to get/getfo 'The message [...] is not extractable!' on calls to getfo May 21, 2015
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants