I am using python2.7 on ubuntu system. I am getting following errors while working with "os":
AttributeError: 'module' object has no attribute 'fsencode'
On this line:
directory=os.fsencode(indir)
I have checked other solutions but they are not relevant.