title: Julia - AttributeError("'PyCall.jlwrap' object has no attribute 'encode'")
body: <p>I am trying to use the package mappy from python inside julia but I get this error: AttributeError(&quot;'PyCall.jlwrap' object has no attribute 'encode'&quot;). I don't understand this error.</p>
  <p>here is my code:</p>
  <pre><code>using PyCall
  using FASTX
  using CodecZlib
  
  py&quot;&quot;&quot;
  import mappy as mp
  
  def aligner(name,preset,threads):
      aligner = mp.Aligner(name,preset=preset,n_threads = threads)
      return aligner
  
  def mappy(seq,aligner):
      try:
          line = next(aligner.map(seq))
          return False
      except StopIteration:
          return True
  &quot;&quot;&quot;
  aligner = py&quot;aligner&quot;(&quot;genome.idx&quot;,&quot;sr&quot;,4)
  for record in FASTQ.Reader(GzipDecompressorStream(open(&quot;data_file.fastq.gz&quot;)))
      check = py&quot;mappy&quot;(sequence(record),aligner)
      
  end
  close(reader)
  </code></pre>