[Chicago] sgmlparser problem

Lukasz Szybalski szybalski at gmail.com
Mon Dec 11 00:35:12 CET 2006


Hello,
Would you guys know how to bypass this error i'm getting from sgml parser.

expected name token at '<! -- NEW PAGE -'

Obviously the <! -- should be <!-- 

How can i tell sgmlparser to move on and/or bypass not valid html.


File "/usr/lib/python2.4/sgmllib.py", line 95, in feed
    self.goahead(0)
  File "/usr/lib/python2.4/sgmllib.py", line 165, in goahead
    k = self.parse_declaration(i)
  File "/usr/lib/python2.4/markupbase.py", line 95, in parse_declaration
    decltype, j = self._scan_name(j, i)
  File "/usr/lib/python2.4/markupbase.py", line 384, in _scan_name
    self.error("expected name token at %r"
  File "/usr/lib/python2.4/sgmllib.py", line 102, in error
    raise SGMLParseError(message)
sgmllib.SGMLParseError: expected name token at '<! -- NEW PAGE -

thanks
Lucas


More information about the Chicago mailing list