title: python 2.6 TypeError: coercing to Unicode: need string or buffer, list found
body: <p>I dont understand the reason of this TypeError</p>
  
  <p>script:</p>
  
  <pre><code>import os
  import shutil
  
  src1 = os.listdir("/usr/dir1")
  dst1 = os.listdir("/usr/dir2")
  
  
  for file in src1:
      if file not in dst1:
          shutil.copy(file, dst1)
  </code></pre>
  
  <p>Error: </p>
  
  <pre><code>File "/scripts/trans_dir_balancing.py", line 14, in &lt;module&gt;
      shutil.copy(file, dst1)
    File "/usr/lib64/python2.6/shutil.py", line 82, in copy
      if os.path.isdir(dst):
    File "/usr/lib64/python2.6/genericpath.py", line 41, in isdir
      st = os.stat(s)
  TypeError: coercing to Unicode: need string or buffer, list found
  </code></pre>
  
  <p>Thanks for help </p>