Getting TypeError in Changing file permissions
Benjamin Niemann
pink at odahoda.de
Fri Jul 22 15:46:33 EDT 2005
Pranav Bagora wrote:
> Hello ,
> i am trying to change mode of files using the
> os.chmod()function. But i am getting an error
>
> " os.chmod(outfile,0700)
> TypeError: coercing to Unicode: need string or buffer,
> file found"
Looks as if your are using a file object (that you got from an open() call)
as the first parameter. What you need is a string with the path to the
file.
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
More information about the Python-list
mailing list