I am trying to parse HTML for the first time. I first installed
4Suite-1.0a3.win32-py2.3.exe and then realized I didn't need it. Then I
installed PyXML-0.8.3.win32-py2.3.exe. Now when I try to execute this as
the first line of my module ...
from xml.dom.ext.rea der import Sax2
.... I get this Exception ...
Sequence index out of range: list index out of range
Traceback (innermost last):
File "<string>", line 1, in ?
File "c:\codeshare\c odeshare.py", line 4, in ?
from xml.dom.ext.rea der import Sax2
File "C:\Python23\Li b\site-packages\_xmlpl us\dom\__init__ .py", line 223, in
?
from xml.dom.html import HTMLDOMImplemen tation
File "C:\Python23\Li b\site-packages\_xmlpl us\dom\html\__i nit__.py", line
445, in ?
g_numCharEntity Pattern = re.compile('&#( \d+);')
File "C:\Python23\Li b\sre.py", line 179, in compile
return _compile(patter n, flags)
File "C:\Python23\Li b\sre.py", line 227, in _compile
p = sre_compile.com pile(pattern, flags)
File "C:\Python23\Li b\sre_compile.p y", line 469, in compile
code = _code(p, flags)
File "C:\Python23\Li b\sre_compile.p y", line 453, in _code
_compile(code, p.data, flags)
File "C:\Python23\Li b\sre_compile.p y", line 88, in _compile
_compile(code, av[1], flags)
File "C:\Python23\Li b\sre_compile.p y", line 69, in _compile
_compile(code, av[2], flags)
File "C:\Python23\Li b\sre_compile.p y", line 27, in _compile
for op, av in pattern:
File "C:\Python23\Li b\sre_parse.py" , line 138, in __getitem__
return self.data[index]
4Suite-1.0a3.win32-py2.3.exe and then realized I didn't need it. Then I
installed PyXML-0.8.3.win32-py2.3.exe. Now when I try to execute this as
the first line of my module ...
from xml.dom.ext.rea der import Sax2
.... I get this Exception ...
Sequence index out of range: list index out of range
Traceback (innermost last):
File "<string>", line 1, in ?
File "c:\codeshare\c odeshare.py", line 4, in ?
from xml.dom.ext.rea der import Sax2
File "C:\Python23\Li b\site-packages\_xmlpl us\dom\__init__ .py", line 223, in
?
from xml.dom.html import HTMLDOMImplemen tation
File "C:\Python23\Li b\site-packages\_xmlpl us\dom\html\__i nit__.py", line
445, in ?
g_numCharEntity Pattern = re.compile('&#( \d+);')
File "C:\Python23\Li b\sre.py", line 179, in compile
return _compile(patter n, flags)
File "C:\Python23\Li b\sre.py", line 227, in _compile
p = sre_compile.com pile(pattern, flags)
File "C:\Python23\Li b\sre_compile.p y", line 469, in compile
code = _code(p, flags)
File "C:\Python23\Li b\sre_compile.p y", line 453, in _code
_compile(code, p.data, flags)
File "C:\Python23\Li b\sre_compile.p y", line 88, in _compile
_compile(code, av[1], flags)
File "C:\Python23\Li b\sre_compile.p y", line 69, in _compile
_compile(code, av[2], flags)
File "C:\Python23\Li b\sre_compile.p y", line 27, in _compile
for op, av in pattern:
File "C:\Python23\Li b\sre_parse.py" , line 138, in __getitem__
return self.data[index]
Comment