need help with PyXML

M

Mark Hahn

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.reader 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\codeshare.py", line 4, in ?
from xml.dom.ext.reader import Sax2
File "C:\Python23\Lib\site-packages\_xmlplus\dom\__init__.py", line 223, in
?
from xml.dom.html import HTMLDOMImplementation
File "C:\Python23\Lib\site-packages\_xmlplus\dom\html\__init__.py", line
445, in ?
g_numCharEntityPattern = re.compile('&#(\d+);')
File "C:\Python23\Lib\sre.py", line 179, in compile
return _compile(pattern, flags)
File "C:\Python23\Lib\sre.py", line 227, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Python23\Lib\sre_compile.py", line 469, in compile
code = _code(p, flags)
File "C:\Python23\Lib\sre_compile.py", line 453, in _code
_compile(code, p.data, flags)
File "C:\Python23\Lib\sre_compile.py", line 88, in _compile
_compile(code, av[1], flags)
File "C:\Python23\Lib\sre_compile.py", line 69, in _compile
_compile(code, av[2], flags)
File "C:\Python23\Lib\sre_compile.py", line 27, in _compile
for op, av in pattern:
File "C:\Python23\Lib\sre_parse.py", line 138, in __getitem__
return self.data[index]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top