title: FTPServer in Python throws exception on 'mget'
body: <pre><code>I implemented a FTP Server in Python using pyftpdlib.ftpserver
  This works fine with mput/put operations but fails with mget/get. Following exception is thrown:
  </code></pre>
  
  <blockquote>
    <p>[]10.203.200.136:62408 Connected.
        10.203.200.136:62408 ==> 220 pyftpdlib 0.5.2 ready.
        10.203.200.136:62408 &lt;== USER user
        10.203.200.136:62408 ==> 331 Username ok, send password.
        10.203.200.136:62408 &lt;== PASS <strong>**</strong>
        10.203.200.136:62408 ==> 230 Login successful.
        [user]@10.203.200.136:62408 User user logged in.
        10.203.200.136:62408 &lt;== TYPE A
        10.203.200.136:62408 ==> 200 Type set to: ASCII.
        10.203.200.136:62408 &lt;== PORT 10,203,200,136,243,206
        10.203.200.136:62408 ==> 200 Active data connection established.
        10.203.200.136:62408 &lt;== NLST RS.pcap
        [user]@10.203.200.136:62408 OK NLST "/RS.pcap". Transfer starting.
        10.203.200.136:62408 ==> 125 Data connection already open. Transfer starting.
        10.203.200.136:62408 ==> 226 Transfer complete.
        10.203.200.136:62408 &lt;== TYPE A
        10.203.200.136:62408 ==> 200 Type set to: ASCII.
        10.203.200.136:62408 &lt;== PORT 10,203,200,136,243,208
        10.203.200.136:62408 ==> 200 Active data connection established.
        10.203.200.136:62408 &lt;== RETR RS.pcap
        [user]@10.203.200.136:62408 OK RETR "/RS.pcap". Download starting.
        10.203.200.136:62408 ==> 125 Data connection already open. Transfer starting.
        10.203.200.136:62408 ==> 426 Internal error; transfer aborted.</p>
  </blockquote>
  
  <pre><code>Traceback (most recent call last):
      File "C:\Python31\lib\asynchat.py", line 244, in initiate_send
          data = buffer(first, 0, obs)
      File "C:\Python31\lib\asynchat.py", line 56, in buffer
          memoryview(obj)
  TypeError: cannot make memory view because object does not have the buffer interface
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
      File "C:\Python31\lib\pyftpdlib\ftpserver.py", line 2077, in push_dtp_data
          self.data_channel.push_with_producer(data)
      File "C:\Python31\lib\asynchat.py", line 211, in push_with_producer
          self.initiate_send()
      File "C:\Python31\lib\asynchat.py", line 246, in initiate_send
          data = first.more()
      File "C:\Python31\lib\pyftpdlib\ftpserver.py", line 1143, in more
          return bytes(data, BYTES_ENCODING)
  TypeError: encoding or errors without a string argument
  </code></pre>
  
  <p>Now in asynchat.py (which is called internally), in initiate_send, buffer is called which throws an exception when memoryview(obj) is done; obj being a FileProducer type of object.</p>
  
  <p>Can anyone please suggest what possible error is it? Is there a problem in python library? How to solve it?</p>