Menu

#279 ZSI AttributeError: 'tuple' object has no attribute 'append'

v2.1
open-invalid
nobody
zsi (169)
5
2014-08-14
2009-07-17
Kyle
No

I'm not sure if this is a bug or not, but I've been beating myself over the head with it for about 8 hours now. Can anyone point me in the right direction?

------------------------------------------------------------------------------------------------
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import getServer_client as c

In [2]: loc = c.getServerLocator()

In [3]: srv = loc.gete
loc.getexecute_pt loc.getexecute_ptAddress

In [3]: srv = loc.getexecute_pt()

In [4]: msg = c.requestMessage()

In [5]: msg.set_element_SrvId(623735)

In [6]: rep = srv.execute(msg)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/Users/kyle/Desktop/PythonTest/<ipython console> in <module>()

/Users/kyle/Desktop/PythonTest/getServer_client.pyc in execute(self, request, **kw)
39 self.binding.Send(None, None, request, soapaction="execute", **kw)
40 # no output wsaction
---> 41 response = self.binding.Receive(replyMessage.typecode)
42 return response
43

/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/client.pyc in Receive(self, replytype, **kw)
534 isarray = ((type(tp) in (tuple,list) and tp[1] == 'Array') or _find_arraytype(ps.body_root))
535 if self.typesmodule is None or isarray:
--> 536 return _Binding.Receive(self, replytype, **kw)
537
538 if ps.IsAFault():

/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/client.pyc in Receive(self, replytype, **kw)
459 tc = replytype.typecode
460
--> 461 reply = self.ps.Parse(tc)
462 if self.address is not None:
463 self.address.checkResponse(self.ps, kw.get('wsaction'))

/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/parse.pyc in Parse(self, how)
324 '''
325 if type(how) == types.ClassType: how = how.typecode
--> 326 return how.parse(self.body_root, self)
327
328 def WhatMustIUnderstand(self):

/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/TCcompound.pyc in parse(self, elt, ps)
194 if what.name_match(c_elt):
195 match = True
--> 196 value = what.parse(c_elt, ps)
197 else:
198 # substitutionGroup head must be a global element declaration

/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/TCcompound.pyc in parse(self, elt, ps)
194 if what.name_match(c_elt):
195 match = True
--> 196 value = what.parse(c_elt, ps)
197 else:
198 # substitutionGroup head must be a global element declaration

/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/TC.pyc in parse(self, elt, ps)
1121 fp = self.text_to_data(v, elt, ps)
1122 except EvaluateException, ex:
-> 1123 ex.args.append(ps.Backtrace(elt))
1124 raise ex
1125

AttributeError: 'tuple' object has no attribute 'append'

In [7]:

Discussion

  • Kyle

    Kyle - 2009-07-18
    • status: open --> open-invalid
     
  • Kyle

    Kyle - 2009-07-18

    My apologies. The bug was with the server I'm connecting to. It claims it is returning decimals, but it is returning strings, so ZSI.TC.parse fails when it tries to convert the string into a fp.

     

Log in to post a comment.