title: Problem to convert act format to CSV a bytes-like object is required, not 'str'
body: <p>I have a problem converting an .act file to csv format. I am using this code:</p>
  <pre><code>import struct
  import csv
  
  DATA = []
  
  with open(&quot;modis_lst.act&quot;, &quot;rb&quot;) as actFile:
      for _ in range(256):
          raw = actFile.read(3)
          color = struct.unpack(&quot;3B&quot;, raw)
          DATA.append(color)
  
  
  with open('test.csv', 'wb') as csvfile:
     csvWriter = csv.writer(csvfile)
     csvWriter.writerows(DATA)
  </code></pre>
  <p>but I get the following ERROR:
  a bytes-like object is required, not 'str'</p>