From: Jonathan H. <jon...@se...> - 2003-11-14 08:21:14
|
On 14 Nov 2003, at 01:16, Sang Yi wrote: > File "/home/shy2/ark-src/ARK/arkbase/ark/xmlfile.py", line 708, in > zero_attributes > if len(node.attributes) != 0: > TypeError: len() of unsized object > > this was on a solaris 2.8 box with python 2.3.2 > anyone else run into this before? thought i'd ask before i start > digging through the *.py. This is almost certainly something strange with the XML parser you are using. Have you installed a particular version of PyXML? Or are you just using Python bare? ark tries to do The Right Thing with whatever XML parser you have available, but it looks like the one it's chosen is broken. Can you try the following things in Python and let us know what you get: >>> import xml >>> xml.__version__ '1.13' >>> import xml.dom.minidom >>> doc = xml.dom.minidom.parseString( '<test><me/></test>' ) >>> root = doc.documentElement >>> len( root.attributes ) 0 It's probably just another special case that we need to add to the parser detection logic. Jonathan -- Jonathan Hogg Director, Technology Seventh Wave Systems Ltd. <http://www.seventh-wave-systems.com/> |