Re: problems with try-ark

Jonathan Hogg <[email protected]> Fri, 14 Nov 2003 08:21:14 +0000
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
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/>



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/