Returning lists from python COM servers
Olly Smith
oliver.smith at removethisbit.baesystems.com
Thu Sep 5 06:31:40 EDT 2002
Using this snippet on the server side:
==
return (tags,vals)
==
Where tags and vals are equal length lists (actually a dict that maps
strings to strings split up so it can be returned from the COM object)
This snippet on the client side:
==
tags,vals = self.prodcat.getPDF(id)
==
I get this error (mildly snipped cgitb output):
==
547 tag,val = self.prodcat.getPDF(id)
ValueError: unpack tuple of wrong size
__doc__ = 'Inappropriate argument value (of correct type).'
__getitem__ = <bound method ValueError.__getitem__ of
<exceptions.ValueError instance at 0x00849670>>
__init__ = <bound method ValueError.__init__ of <exceptions.ValueError
instance at 0x00849670>>
__module__ = 'exceptions'
__str__ = <bound method ValueError.__str__ of <exceptions.ValueError
instance at 0x00849670>>
args = ('unpack tuple of wrong size',)
==
Any ideas on where I'm going wrong? I'm pulling my hair out trying to work
this one out.
Thanks
Olly
More information about the Python-list
mailing list