sgmllib.SGMLParseError: unexpected ':' char in declaration
Robert Roy
rjroy at takingcontrol.com
Mon Feb 24 18:26:01 EST 2003
Are you perhaps trying to parse XML with namespaces? ":" is not a
legal name character in SGML where it is in XML.
bob
On Sat, 22 Feb 2003 11:39:31 +0100, Alessio Pace <puccio_13 at yahoo.it>
wrote:
>I can't figure out how to solve this raised error in my application, I'm
>trying to use the htmllib.HTMLParser, it usually works fine but in some
>cases(I don't know why, I am processing hundreds of html texts, I will
>debug eventually case per case later..) it raises this:
>
>Traceback (most recent call last):
>[......... ]
> File "Html2Txt.py", line 45, in convertToTxt # my class Html2Txt
> parser.close() # close the htmllib.HTMLParser
> File "/usr/lib/python2.2/sgmllib.py", line 99, in close
> self.goahead(1)
> File "/usr/lib/python2.2/sgmllib.py", line 161, in goahead
> k = self.parse_declaration(i)
> File "/usr/lib/python2.2/markupbase.py", line 96, in parse_declaration
> self.error(
> File "/usr/lib/python2.2/sgmllib.py", line 102, in error
> raise SGMLParseError(message)
>sgmllib.SGMLParseError: unexpected ':' char in declaration
>
>Thanks if some one can help me, I am a newbie of python.
>
More information about the Python-list
mailing list