Help with capturing error
Chris Rebert
clp at rebertia.com
Thu Nov 27 18:22:10 EST 2008
On Thu, Nov 27, 2008 at 12:33 PM, tekion <tekion at gmail.com> wrote:
> Hello,
> I am getting the following error and my script is bailing out because
> of it. I have tried capturing it but it does not seem to work. Below
> is the error:
>
> ValueError: I/O operation on closed file
>
>
> the above error is received when, the following code snippet is
> executed:
> try:
> 117 self.xml_file.close()
> 118 except ValueError:
> 119 print "file, %s is already closed" % self.seek_file
>
> Any idea why line 118, is not capturing the error? Thanks.
In order to help you debug an exception, generally a full Traceback is
necessary.
If you post the full traceback, it will help people immensely in
helping determine the cause of your problem.
Cheers,
Chris
--
Follow the path of the Iguana...
http://rebertia.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list