On 12/12/2013 11:29 PM, Unix SA wrote: > ... > > With above prog I am getting error > TypeError: coercing to Unicode: need sting or buffer, file found > In future please copy and paste the entire traceback. It appears that you typed in just one line of it. In this case the line raising the exception was obvious, but often it is not.