Changed the buffer_length parameter to buffer.qsize()