echo "Denied" > log.txt
later log.txt is opened in python:
def read_file(logs,self): print 'here' f1=open(logs,"r","utf-8") for line in f1: print str(line) On running it gives error:
"TypeError: coercing to Unicode: need string or buffer, instance found"