Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#287 RuntimeError: maximum recursion depth exceeded while calling

v2.0
closed-invalid
zsi (169)
5
2010-02-11
2010-02-10
Hari Dara
No

While using recursive schema type references, wsdl2py generates the python client modules, but importing those python modules gives this RUntimeError (apparently due to an infinite recursion). I am attaching a test wsdl file to demonstrate this error. Run the below command on the file:

wsdl2py --complexType --file test.wsdl

and then try to import the module:

$ python
>>> import test_services

Here are the last few lines in the traceback (the full length of which is 503 lines):

File "test_services_types.py", line 25, in __init__
TClist = [GTD("SOAP/test","ListValue",lazy=False)(pname="item", aname="_item", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))]
File "test_services_types.py", line 45, in __init__
TClist = [ZSI.TCnumbers.Ilong(pname="longValue", aname="_longValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.FPdouble(pname="doubleValue", aname="_doubleValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="stringValue", aname="_stringValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.AnyType(pname="boolValue", aname="_boolValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="decimalValue", aname="_decimalValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="dateValue", aname="_dateValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="datetimeValue", aname="_datetimeValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("SOAP/test","List",lazy=False)(pname="listValue", aname="_listValue", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
File "C:\Documents and Settings\darah\Application Data\Python\Python26\site-packages\ZSI\TC.py", line 943, in __init__
TypeCode.__init__(self, pname, **kw)
RuntimeError: maximum recursion depth exceeded while calling a Python object

Discussion

  • Please look at the "-help" and try using the "-lazy" flag.

     
    • assigned_to: nobody --> boverhof
    • status: open --> pending-invalid
     
  • Hari Dara
    Hari Dara
    2010-02-11

    • status: pending-invalid --> closed-invalid
     
  • Hari Dara
    Hari Dara
    2010-02-11

    Thanks for pointing out the -lazy flag. I still have an issue with this type structure, but this original problem is gone, so closing it.