title: Python docx - AttributeError: 'bytes' object has no attribute 'seek'
body: <p>What I have as input: docx document raw bytes in byte64 format.<br>
  What I am trying to achieve: extract text from this document for further processing.<br>
  I tried to follow this answer: <a href="https://stackoverflow.com/questions/125222/extracting-text-from-ms-word-files-in-python/1979906#1979906">extracting text from MS word files in python</a></p>
  
  <p>My code fragment:</p>
  
  <pre><code>base64_bytes = input.encode('utf-8')
  decoded_data = base64.decodebytes(base64_bytes)
  document = Document(decoded_data)
  docText = '\n\n'.join([paragraph.text.encode('utf-8') for paragraph in document.paragraphs])
  </code></pre>
  
  <p>The <code>document = Document(decoded_data)</code> line gives me the following error: <code>AttributeError: 'bytes' object has no attribute 'seek'</code><br>
  The <code>decoded_data</code> is in the following format: <code>b'PK\\x03\\x04\\x14\\x00\\x08\\x08\\x08\\x00\\x87@CP\\x00...</code></p>
  
  <p>How should I format the raw data to extract text from docx?</p>