From: Sang Y. <Sa...@Ov...> - 2003-11-14 16:01:50
|
no pyXML as my version is > 1.5.2 here's my output from python: Python 2.3.2 (#1, Nov 12 2003, 16:24:36)=20 [GCC 2.95.2 19991024 (release)] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import xml >>> xml.__version__ '1.13' -----Original Message----- From: Jonathan Hogg [mailto:jon...@se...] Sent: Friday, November 14, 2003 12:21 AM To: Sang Yi Cc: ar...@li... Subject: Re: problems with try-ark On 14 Nov 2003, at 01:16, Sang Yi wrote: > File "/home/shy2/ark-src/ARK/arkbase/ark/xmlfile.py", line 708, in=20 > zero_attributes > if len(node.attributes) !=3D 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=20 > digging through the *.py. This is almost certainly something strange with the XML parser you are=20 using. Have you installed a particular version of PyXML? Or are you=20 just using Python bare? ark tries to do The Right Thing with whatever XML parser you have=20 available, but it looks like the one it's chosen is broken. Can you try=20 the following things in Python and let us know what you get: >>> import xml >>> xml.__version__ '1.13' >>> import xml.dom.minidom >>> doc =3D xml.dom.minidom.parseString( '<test><me/></test>' ) >>> root =3D doc.documentElement >>> len( root.attributes ) 0 It's probably just another special case that we need to add to the=20 parser detection logic. Jonathan --=20 Jonathan Hogg Director, Technology Seventh Wave Systems Ltd. <http://www.seventh-wave-systems.com/> |