i/o prob revisited

Tim Roberts timr at probo.com
Tue May 22 02:40:20 EDT 2007


saif.shakeel at gmail.com wrote:
>
>ok i am able to trace the error ...It says:
>Traceback (most recent call last):
>  File "C:\Projects\ODX Import\code_ini\odxparse_mod.py", line 294, in
><module>
>    input_xml_sec = open(output_file,'r')
>TypeError: coercing to Unicode: need string or buffer, file found
>                        Any solutions.

I don't see how the error could possibly make it any clearer.  "open"
expects a file name.  "output_file" is not a file NAME.  It is a file
OBJECT.  If you want to reopen that file, then pass the file NAME here.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list