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] 1 1759
Note: I just found a thread from over a year ago where someone else
reported the same bug. Can someone give me a hint on how to work around
this bug?
previous thread: http://tinyurl.com/p8xj
"Mark Hahn" <ma**@hahnca.com> wrote in message
news:p3oeb.4606$hp5.3567@fed1read04... 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]
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Richard Petty |
last post by:
I've got a machine running Yellow Dog Linux (a PPC version of Red Hat) which has
Python 1.5.2-35a and I'd like to update.
I'd prefer to install from sources rather than depend on other people to...
|
by: gael.pegliasco |
last post by:
Hi,
How are you dear and nice helper :) ?
I'm trying to test xpath with this simple program :
import xml.dom.minidom
from xml.xpath.Context import Context
import xml.xpath
|
by: Alain |
last post by:
Hi !
I'm looking for an XPath implementation (even partial) on PyXML.
I'm using libxml2 on Windows XP.
It works well but I have to port my application on RISCOS (OS on ARM
processor) where only...
|
by: Dan |
last post by:
I'm writing a Python program that does some XML parsing, though nothing
heavy, and I want to avoid requiring the user to install additional
libraries like PyXML.
The documentation for my version...
|
by: ankit |
last post by:
Python itself provides parsers for xml and Dom support. So, if I
install pyxml what additional advantage or features I will get in pyxml
specially in minidom and parsers.
Anyone, please provide...
|
by: Matthias Kaeppler |
last post by:
Hi,
I have to say I am confused about the documentation on pyxml.sf.net.
When I want to use DOM, I effectively am using a class called Sax2? ^^
I also have to catch SAXExceptions, which reside...
|
by: loial |
last post by:
I have been asked to install a python application on AIX 5.3 that runs
OK on Windows
I have installed Python 4.2.2 from python.org and pyXML form
sourceforge.
However when I run the application...
|
by: Thomas W |
last post by:
I've tried to install the pyxml-package, available at http://pyxml.sourceforge.net/,
both from source and using some hack on the win32-binary package
available for python2.4, but without luck....
|
by: John Carlyle-Clarke |
last post by:
Hi.
I'm new to Python and trying to use it to solve a specific problem. I
have an XML file in which I need to locate a specific text node and
replace the contents with some other text. The...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |