title: TypeError: encoding or errors without a string argument
body: <p>I'm trying to write a list of data bytes to a CSV file. Since it's a list of byte strings, I used the below code:</p>
  
  <pre><code>with open(r"E:\Avinash\Python\extracting-drug-data\out.csv", "wb") as w:
      writer = csv.writer(w)
      writer.writerows(bytes(datas, 'UTF-8'))
  </code></pre>
  
  <p>But it results in the following error:</p>
  
  <blockquote>
    <p>TypeError: encoding or errors without a string argument</p>
  </blockquote>
  
  <p><code>datas</code> is a list of byte strings.</p>
  
  <pre><code>print(datas)
  </code></pre>
  
  <p>yields</p>
  
  <pre><code>[b'DB08873', b' MOLSDFPDBSMILESInChIView Structure \xc3\x97Structure for DB08873 (Boceprevir) Close', b'394730-60-0', b'LHHCSNFAOIFYRV-DOVBMPENSA-N', b'Organic acids and derivatives  ', b'Food increases exposure of boceprevir by up to 65% relative to fasting state. However, type of food and time of meal does not affect bioavailability of boceprevir and thus can be taken without regards to food.  \r\nTmax = 2 hours;\r\nTime to steady state, three times a day dosing = 1 day;\r\nCmax]
  </code></pre>
  
  <p>I want the above list to be printed as first row in a CSV file with the decoding of Unicode chars. That is, <code>\xc3\x97</code> should be converted to it's corresponding character.</p>