M
Mike Thompson
I've run into a problem using WingIDE. I have a dead simple script
(which uses ElementTree):
from elementtree.ElementTree import Element, SubElement, tostring
e = Element("Outer")
sub = SubElement(e, 'Version').text = "v1.0"
print tostring(e)
When I run this script from the command line, it works (as it should) -
an XML document is printed.
BUT, when I load this script into Winge IDE and run this under the
debugger, I get an exception which appears completely bogus (but does
always happen in the same place every time, at least):
IndexError: list index out of range
Traceback (innermost last):
File "C:\MediaWise\src\MCN_Wizard_Exe\test.py", line 1, in ?
from elementtree.ElementTree import Element, SubElement, tostring
File "C:\MediaWise\src\MCN_Wizard_Exe\test.py", line 6, in ?
print tostring(e)
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
924, in tostring
ElementTree(element).write(file, encoding)
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
666, in write
self._write(file, self._root, encoding, {})
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
710, in _write
self._write(file, n, encoding, namespaces)
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
709, in _write
for n in node:
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
227, in __getitem__
return self._children[index]
The exception is triggered in ElementTree but the code is fine.
Something about the Wing IDE debuger is causing this exception to be
thrown.
Does anyone have any insight? WingIDE looks pretty good to me, so I'm
disappointed to find this problem.
I've reported the problem to wingware.com, but I need to keep going, so
I thought I'd ask here for clues.
I'm using WingIDE 2.0.1-1, Professional on Windows XP. Py2.3.3
(which uses ElementTree):
from elementtree.ElementTree import Element, SubElement, tostring
e = Element("Outer")
sub = SubElement(e, 'Version').text = "v1.0"
print tostring(e)
When I run this script from the command line, it works (as it should) -
an XML document is printed.
BUT, when I load this script into Winge IDE and run this under the
debugger, I get an exception which appears completely bogus (but does
always happen in the same place every time, at least):
IndexError: list index out of range
Traceback (innermost last):
File "C:\MediaWise\src\MCN_Wizard_Exe\test.py", line 1, in ?
from elementtree.ElementTree import Element, SubElement, tostring
File "C:\MediaWise\src\MCN_Wizard_Exe\test.py", line 6, in ?
print tostring(e)
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
924, in tostring
ElementTree(element).write(file, encoding)
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
666, in write
self._write(file, self._root, encoding, {})
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
710, in _write
self._write(file, n, encoding, namespaces)
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
709, in _write
for n in node:
File "C:\Python23\Lib\site-packages\elementtree\ElementTree.py", line
227, in __getitem__
return self._children[index]
The exception is triggered in ElementTree but the code is fine.
Something about the Wing IDE debuger is causing this exception to be
thrown.
Does anyone have any insight? WingIDE looks pretty good to me, so I'm
disappointed to find this problem.
I've reported the problem to wingware.com, but I need to keep going, so
I thought I'd ask here for clues.
I'm using WingIDE 2.0.1-1, Professional on Windows XP. Py2.3.3