Unusual i/o problems

saif.shakeel at gmail.com saif.shakeel at gmail.com
Fri May 18 05:02:40 EDT 2007


On May 18, 1:01 pm, Peter Otten <__pete... at web.de> wrote:
> saif.shak... at gmail.com wrote:
> > I am running the exe from command prompt,but i am not able to see
> > the error as it goes off very quickly.
>
> http://effbot.org/pyfaq/how-do-i-run-a-python-program-under-windows.htm
>
> > How do i capture the error (traceback).I tried putting an input prompt
> > after the expected line of error but wont work.Is there a command to
> > capture the error.
>
> You can redirect stderr to a file:
>
> http://www.microsoft.com/resources/documentation/windows/xp/all/prodd...
>
> Peter

ok i traced the error for above code.It says something like this:
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
                    Can someone help me in this.
                           Thanks




More information about the Python-list mailing list