<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=Windows-1252>
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT face=Garamond color=#000080>Found the mismatched tag on line
94:</FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Garamond color=#000080>"<p>My Name in Nelma Lois
Thornton-S.S. No. sjn-yz-yokv/p>"</FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Garamond color=#000080>should be:</FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Garamond color=#000080>"<p>My Name in Nelma Lois
Thornton-S.S. No. sjn-yz-yokv</p>"</FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080>I'll run all the html files through a simple script to identify
the mismatches using etree. Thanks.</FONT></FONT></FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Garamond color=#000080>Dinesh</FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Garamond><FONT color=#000080><FONT face=Garamond
color=#000080></FONT></FONT></FONT></DIV>
<DIV><FONT face=Garamond color=#000080><BR></FONT></DIV>
<DIV style="FONT: 10pt Tahoma; font-color: black"><FONT face=Garamond><FONT
size=3><FONT color=#000080><B>From:</B> </FONT></FONT></FONT><A
title=kent37@tds.net href="mailto:kent37@tds.net"><FONT face=Garamond
color=#000080 size=3>Kent Johnson</FONT></A><FONT face=Garamond color=#000080
size=3> </FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><B>Sent:</B> Tuesday, April 28,
2009 8:17 AM</FONT></FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><B>To:</B> </FONT></FONT><A
title=dineshbvadhia@hotmail.com href="mailto:dineshbvadhia@hotmail.com"><FONT
face=Garamond color=#000080>Dinesh B Vadhia</FONT></A><FONT face=Garamond
color=#000080> </FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><B>Cc:</B> </FONT></FONT><A
title=tutor@python.org href="mailto:tutor@python.org"><FONT face=Garamond
color=#000080>tutor@python.org</FONT></A><FONT face=Garamond color=#000080>
</FONT></DIV>
<DIV><FONT face=Garamond><FONT color=#000080><B>Subject:</B> Re: [Tutor] finding
mismatched or unpaired html tags</FONT></FONT></DIV>
<DIV><FONT face=Garamond color=#000080><BR></FONT></DIV>
<DIV><FONT face=Garamond color=#000080>On Tue, Apr 28, 2009 at 10:41 AM, Dinesh
B Vadhia<BR><</FONT><A href="mailto:dineshbvadhia@hotmail.com"><FONT
face=Garamond color=#000080>dineshbvadhia@hotmail.com</FONT></A><FONT
face=Garamond color=#000080>> wrote:<BR>> This is the error and
traceback:<BR>><BR>> Unexpected error opening J:/F2/....html: mismatched
tag: line 124, column 8<BR>><BR>> Traceback (most recent call
last):<BR>> File "C:\....py", line 492, in <module><BR>>
raw = extractText(xhtmlfile)<BR>> File "C:\....py",
line 334, in extractText<BR>> tree =
make_tree(xhtmlfile)<BR>> File "....py", line 169, in
make_tree<BR>> return tree<BR>> UnboundLocalError:
local variable 'tree' referenced before assignment<BR><BR>This is inconsistent.
The exception in the stack trace is from a<BR>coding error in extractText. It
looks like maybe ExtractText is<BR>catching exceptions and printing them, and a
bug in the exception<BR>handling is causing the UnboundLocalError<BR><BR>>
Here is line 124, col 8 and I cannot see any obvious missing/mismatched<BR>>
tags:<BR>><BR>> "<p>As to the present time I am unable physical and
mentally to secure all<BR>> this information at present.</p>"<BR><BR>If
you look at a few more lines do you see anything untoward? Perhaps<BR>there is a
missing </b> before the <p>, for example? I don't think
<p><BR>is allowed inside every
tag.<BR><BR>Kent<BR></FONT></DIV></BODY></HTML>