---------------------------------------------------------------------------
EOFError Traceback (most recent call last)
<ipython-input-6-8d2b06d3df0e> in <module>()
17 try:
18 getfile=False
---> 19 host.download(remotefile,localfile,mode='b')
20 except IOError:
21 print "IOError on download of file {0}".format(remotefile)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ftputil/ftputil.pyc in download(self, source, target, mode, callback)
518 source_file, target_file = self._download_files(source, target, mode)
519 file_transfer.copy_file(source_file, target_file,
--> 520 conditional=False, callback=callback)
521
522 def download_if_newer(self, source, target, mode='', callback=None):
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ftputil/file_transfer.pyc in copy_file(source_file, target_file, conditional, callback)
151 # We didn't transfer.
152 return False
--> 153 source_fobj = source_file.fobj()
154 try:
155 target_fobj = target_file.fobj()
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ftputil/file_transfer.pyc in fobj(self)
83 def fobj(self):
84 """Return a file object for the name/path in the constructor."""
---> 85 return self._host.file(self.name, self.mode)
86
87
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ftputil/ftputil.pyc in file(self, path, mode)
205 # Fail early if we get a unicode path which can't be encoded.
206 path = str(path)
--> 207 host = self._available_child()
208 if host is None:
209 host = self._copy()
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ftputil/ftputil.pyc in _available_child(self)
185 if host._file.closed:
186 try:
--> 187 host._session.pwd()
188 # Timed-out sessions raise `error_temp`.
189 except ftplib.error_temp:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ftplib.pyc in pwd(self)
584 def pwd(self):
585 '''Return current working directory.'''
--> 586 resp = self.sendcmd('PWD')
587 return parse257(resp)
588
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ftplib.pyc in sendcmd(self, cmd)
247 '''Send a command and return the response.'''
248 self.putcmd(cmd)
--> 249 return self.getresp()
250
251 def voidcmd(self, cmd):
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ftplib.pyc in getresp(self)
213 # Raise various errors if the response indicates an error
214 def getresp(self):
--> 215 resp = self.getmultiline()
216 if self.debugging: print '*resp*', self.sanitize(resp)
217 self.lastresp = resp[:3]
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ftplib.pyc in getmultiline(self)
199 # these are separated by '\n' characters in the string
200 def getmultiline(self):
--> 201 line = self.getline()
202 if line[3:4] == '-':
203 code = line[:3]
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ftplib.pyc in getline(self)
189 if self.debugging > 1:
190 print '*get*', self.sanitize(line)
--> 191 if not line: raise EOFError
192 if line[-2:] == CRLF: line = line[:-2]
193 elif line[-1:] in CRLF: line = line[:-1]
EOFError: