[XML-SIG] elementtree crash

mf at mails mathias.foehr at mails.lu
Mon Sep 20 13:42:33 CEST 2004


elementtree (version of june 18th, 2004) crashes in a reproducable way
in Python 2.3.4. Unfortunately, it crashes on both Windows and Linux
with the same messages

Sequence index out of range: list index out of range

Traceback (innermost last):

File "<string>", line 1, in ?
File "c:\Donnees\Tpy\sepp_def\experiences\elementtreepy.py", line 3, in?
  from elementtree.ElementTree import Element, SubElement, dump
File "C:\Python23\elementtree\ElementTree.py", line 138, in ?
  import ElementPath
File "C:\Python23\elementtree\ElementPath.py", line 53, in ?
  xpath_tokenizer = re.compile(
File "C:\Python23\Lib\sre.py", line 179, in compile
  return _compile(pattern, flags)
File "C:\Python23\Lib\sre.py", line 228, in _compile
  p = sre_compile.compile(pattern, flags)
File "C:\Python23\Lib\sre_compile.py", line 471, in compile
  code = _code(p, flags)
File "C:\Python23\Lib\sre_compile.py", line 455, in _code
  _compile(code, p.data, flags)
File "C:\Python23\Lib\sre_compile.py", line 128, in _compile
  _compile(code, av, 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 128, in _compile
  _compile(code, av, 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]

 Here's a copy of the file used (comes from effbot.org

 # elementtree-example-1.py

from elementtree.ElementTree import Element, SubElement, dump
window = Element("window")
#title = SubElement(window, "title", font="large")
#title.text = "A sample text window"
#text = SubElement(window, "text", wrap="word")
#box = SubElement(window, "buttonbox")
#SubElement(box, "button").text = "OK"
#SubElement(box, "button").text = "Cancel"
dump(window)

The linux installation is clean, new system (Linux Suse
9.1), new Python installation, new elementtree and new wingide2.0:




More information about the XML-SIG mailing list