<p>Hello,</p>
<p>I am facing some issue when copying or moving file</p>
<p>f=open('/tmp/file1')<br>
s=open('/tmp/file2')</p>
<p>for line in f:<br>
  if 'match' not in line:<br>
     s.write(line)</p>
<p>import shutil<br>
shutil.move(s, f)</p>
<p>With above prog I am getting error <br>
TypeError: coercing to Unicode: need sting or buffer, file found</p>
<p>What that means and how I can resolve it.</p>
<p>Regards,<br>
Dj</p>