|
From: Will P. <pa...@dc...> - 2002-09-25 11:39:08
|
> Perhaps it's a change in minidom? Looking at the error again: > > File "./ark/xmlfile.py", line 722, in zero_attributes > if len(node.attributes) != 0: > TypeError: len() of unsized object > > I have a suspicion that 'node.attributes' is something other than a > collection. ... Looking at the documentation (sorry :-) [http://www.python.org/doc/current/lib/dom-node-objects.html], you can get None for non-elements (e.g. a Text node or a Comment node). Luke, if you want to stick in the odd bit of debugging (temporarily), in ARK/arkbase/ark/xmlfile.py, you could stick in the print statement at... print >>sys.stderr, 'node=',child.nodeName,child.nodeType (fname, fval) = _read_cooked_resource( child, filename ) That should show what kind of funny DOM node is popping up. Jonathan's tweak may work, but we kinda need to know *why* such things are happening. (Remember to clear off your old .xmla files in between trying things [e.g. switching parsers]: cd $ark && find . -name \*.xmla -print | xargs /bin/rm ) Will |