title: Python 3 TypeError: string argument expected, got 'bytes' casperjs_capture
body: <p>I am getting error while executing below code with python 3 but on python 2 it is working fine </p>
  
  <pre><code>template_content = &lt;HTML data&gt;
  with NamedTemporaryFile(suffix='.html') as render_file:
      render_file.write(template_content.encode('utf-8'))
      render_file.seek(0)
      stream = StringIO()
      casperjs_capture(stream, url='file://%s' % os.path.abspath(render_file.name))
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>*** TypeError: string argument expected, got 'bytes'
  </code></pre>