Ticket #239 (assigned defect)

Opened 5 years ago

Last modified 10 months ago

can't handle recursive imports

Reported by: ghz Owned by: jortel
Priority: blocker Milestone:
Component: suds (general) Version: 0.4
Keywords: Cc: skliarie
Blocked By: Blocking:

Description

I got a 'RuntimeError?: maximum recursion depth exceeded while calling a Python object' while loading a wsdl / xsd generated from a Microsoft WCF project. However I found a simpler example wsdl which gives the same error:

For example wsdl:

https://issues.apache.org/jira/secure/attachment/12361562/hello_world_recursive.wsdl https://issues.apache.org/jira/secure/attachment/12361563/hello_world_recursive_import.wsdl

(from an issue raised against another SOAP client : https://issues.apache.org/jira/browse/CXF-778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel)

Thanks

Attachments

fix.recursive.imports.diff (851 bytes) - added by techtonik 4 years ago.
fix for 0.4
test_recur_import.py (483 bytes) - added by csears 3 years ago.
Test script illustrating setrecursionlimit() workaround
recur_import.wsdl (38.1 KB) - added by csears 3 years ago.
Minimal WSDL file for testing setrecursionlimit() workaround. Save to /tmp
dev.virtualearth.net.webservices.v1.search.wsdl.wsdl (3.7 KB) - added by d0ugal 3 years ago.
Example failing WSDL
schema.py.patch (687 bytes) - added by waded 3 years ago.
Patch to handle recursive imports
recurselevel-schema.py.patch (1.2 KB) - added by aronb 3 years ago.
Patch based on WadeD's to allow a fixed number of schema loads per URL
suds_recursion.patch (1.7 KB) - added by thavidu 11 months ago.
Improved patch that addresses TypeNotFound? as well

Change History

comment:1 Changed 5 years ago by ghz

  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 277, in open_imports
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 874, in open
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 894, in download
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 366, in instance
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 200, in __init__
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 277, in open_imports
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 874, in open
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 894, in download
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 366, in instance
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 199, in __init__
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 224, in build
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 94, in build
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 76, in create
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 50, in <lambda>
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 645, in __init__
  File "build/bdist.linux-i686/egg/suds/xsd/sxbase.py", line 94, in __init__
  File "build/bdist.linux-i686/egg/suds/sax/element.py", line 218, in get
  File "build/bdist.linux-i686/egg/suds/sax/element.py", line 287, in attrib
  File "build/bdist.linux-i686/egg/suds/sax/__init__.py", line 49, in splitPrefix

Trace from my original issue (on Windows WCF generated wsdl / xsd).. This may not match the example files I linked to - hope it's the same issue.

comment:2 Changed 5 years ago by jortel

  • Status changed from new to assigned

comment:3 Changed 5 years ago by scottyallen

This also appears to happen for Microsoft's Bing Maps Web Services, ie: http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice.wsdl

comment:4 Changed 5 years ago by montyr

I think I have a fix for the infinite recursion problem, but there is still an XML namespace-binding problem.

I think the following changes to wsdl.py stop the infinite recursion:

--- /home/rod/mw3/webServices/suds/suds/wsdl.py	(revision 569)
+++ /home/rod/mw3/webServices/suds/suds/wsdl.py	(working copy)
@@ -160,7 +160,7 @@
     
     Tag = 'definitions'
 
-    def __init__(self, url, options):
+    def __init__(self, url, options, alreadyImported=None):
         """
         @param url: A URL to the WSDL.
         @type url: str
@@ -168,6 +168,11 @@
         @type options: L{options.Options}
         """
         log.debug('reading wsdl at: %s ...', url)
+        if alreadyImported == None:
+          topLevel = True
+          alreadyImported = []
+        else:
+          topLevel = False
         p = Parser(options.transport)
         root = p.parse(url=url).root()
         WObject.__init__(self, root)
@@ -189,7 +194,8 @@
         pmd.excludes.append('children')
         pmd.excludes.append('wsdl')
         pmd.wrappers['schema'] = lambda x: repr(x)
-        self.open_imports()
+        self.open_imports(alreadyImported)
+        if not topLevel: return
         self.resolve()
         self.build_schema()
         self.set_wrapped()
@@ -231,11 +237,11 @@
                 self.services.append(child)
                 continue
                 
-    def open_imports(self):
+    def open_imports(self, alreadyImported):
         """ Import the I{imported} WSDLs. """
         for imp in self.imports:
             base = self.url
-            imp.load(self)
+            imp.load(self, alreadyImported)
                 
     def resolve(self):
         """ Tell all children to resolve themselves """
@@ -330,13 +336,15 @@
         pmd = self.__metadata__.__print__
         pmd.wrappers['imported'] = ( lambda x: x.id )
         
-    def load(self, definitions):
+    def load(self, definitions, alreadyImported):
         """ Load the object by opening the URL """
         url = self.location
         log.debug('importing (%s)', url)
         if '://' not in url:
             url = urljoin(definitions.url, url)
-        d = Definitions(url, definitions.options)
+        if url in alreadyImported: return
+        alreadyImported.append(url)
+        d = Definitions(url, definitions.options, alreadyImported)
         if d.root.match(Definitions.Tag, wsdlns):
             self.import_definitions(definitions, d)
             return

Alas, with this patch, the example WSDL in the original problem report for this ticket still falls over, not with an infinite recursion, but with

Exception: binding 'import:Greeter_SOAPBinding', not-found

comment:5 Changed 5 years ago by montyr

Very confused here.

I have been using three Web Services, whose WSDL files have recursive imports, for testing my attempted fix for this defect.

  1. The service for which links were posted in the root of Ticket #239.
  1. The service for which there is a link in the change to Ticket #239 posted 09/15/09 18:49:25 by scottyallen.
  1. Another service -- the one I actually want to use personally -- that I have not permission to post publicly here.

With my current patches, I get the following results when I try to build Client objects for the three services:

  1. Fails because its attempt to import the second WSDL file pulls a second copy of the first WSDL file rather than the second WSDL file. I debugged deeply enough to see that it is actually pulling a second copy of the first WSDL file out of the server, through the socket it tried to open against the second WSDL file's URL, rather than it being some caching mess-up.
  1. Fails with an infinite recursion rooted in the build_schema method of the Definitions class defined in Suds source file wsdl.py.
  1. Seems to succeed. I have not actually tried using the service yet, but there's no blow-up and the Client object looks ok on casual inspection.

The failure for 2. I think I understand: it looks like that service has recursive imports in its schema files, whose importing is done in the Schema object in Suds source file xsd/schema.py, rather than in the files whose importing is done by the Definitions object in Suds source file wsdl.py. I'm inclined not to try to fix it, since I have no interest in actually using the service in question.

The failure for 1. just has me stumped. It looks to me like some bizarre server-side Thing is going on.

Here are my current patches:

--- /home/rod/mw3/webServices/suds/suds/wsdl.py	(revision 578)
+++ /home/rod/mw3/webServices/suds/suds/wsdl.py	(working copy)
@@ -160,7 +160,7 @@
     
     Tag = 'definitions'
 
-    def __init__(self, url, options):
+    def __init__(self, url, options, alreadyImported=None):
         """
         @param url: A URL to the WSDL.
         @type url: str
@@ -168,6 +168,11 @@
         @type options: L{options.Options}
         """
         log.debug('reading wsdl at: %s ...', url)
+        if alreadyImported == None:
+          topLevel = True
+          alreadyImported = [url]
+        else:
+          topLevel = False
         p = Parser(options.transport)
         root = p.parse(url=url).root()
         WObject.__init__(self, root)
@@ -184,12 +189,13 @@
         self.bindings = {}
         self.services = []
         self.add_children(self.root)
-        self.children.sort()
         pmd = self.__metadata__.__print__
         pmd.excludes.append('children')
         pmd.excludes.append('wsdl')
         pmd.wrappers['schema'] = lambda x: repr(x)
-        self.open_imports()
+        self.load_imports(alreadyImported)
+        if not topLevel: return
+        self.children.sort()
         self.resolve()
         self.build_schema()
         self.set_wrapped()
@@ -231,10 +237,10 @@
                 self.services.append(child)
                 continue
                 
-    def open_imports(self):
+    def load_imports(self, alreadyImported):
         """ Import the I{imported} WSDLs. """
         for imp in self.imports:
-            imp.load(self)
+            imp.load(self, alreadyImported)
                 
     def resolve(self):
         """ Tell all children to resolve themselves """
@@ -329,13 +335,15 @@
         pmd = self.__metadata__.__print__
         pmd.wrappers['imported'] = ( lambda x: x.id )
         
-    def load(self, definitions):
+    def load(self, definitions, alreadyImported):
         """ Load the object by opening the URL """
         url = self.location
         log.debug('importing (%s)', url)
         if '://' not in url:
             url = urljoin(definitions.url, url)
-        d = Definitions(url, definitions.options)
+        if url in alreadyImported: return
+        alreadyImported.append(url)
+        d = Definitions(url, definitions.options, alreadyImported)
         if d.root.match(Definitions.Tag, wsdlns):
             self.import_definitions(definitions, d)
             return
@@ -350,6 +358,7 @@
         definitions.messages.update(d.messages)
         definitions.port_types.update(d.port_types)
         definitions.bindings.update(d.bindings)
+        definitions.children.extend(d.children)
         self.imported = d
         log.debug('imported (WSDL):\n%s', d)

comment:6 Changed 5 years ago by jortel

Sorry for the delay, looking into this today.

comment:7 Changed 5 years ago by jortel

  • Milestone changed from 0.3.7 to 0.3.8

comment:8 follow-up: ↓ 9 Changed 4 years ago by unixism

This also appears to be happening with PayPal? (https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl). I tried applying the patches above but ended up with not-found error.

I've had to move on to something else but I'm hoping the final fix for this is usable in future.

comment:9 in reply to: ↑ 8 Changed 4 years ago by montyr

When I tried the PayPal? wsdl, it looked like it was failing the same way the BingMaps? wsdl failed, i.e., with circular imports in the schema files rather than in the wsdl files proper. My patches don't fix that failure mode.

comment:10 Changed 4 years ago by iwilkes

I've run into the same problem with Amazon's e-commerce service (http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl) - using 3.8, I get the same result both with and without the above patch.

comment:11 Changed 4 years ago by montyr

As of r644, my patches above no longer work.

I suspect they could be adapted, but I have not yet done so.

comment:12 Changed 4 years ago by patricksurry

I ran into this same issue, where I have schemas within a wsdl that mutually import each other. I traced thru what was going on and it appears that sxbasic.py:Import:open loads the imported schema via sxbasic.py:Import:download which calls Schema:instance to create a new instance. Because that instance has an empty container, the Schema init then recursively does open_import and reloads the first one, ad infinitum.

I don't really understand how it's meant to work, but it seems to fix my issue if I make sure that the new instance() goes into the same SchemaCollection? (container) as the parent, and force it to always get parsed (Schema:build).

Anyway, my diffs are below and work for me though no doubt break something else...

$ diff -b schema.py /c/tmp/x/python-suds-0.3.9/suds/xsd/schema.py
217d216
<         self.build()
218a218
>             self.build()
376c376
<     def instance(self, root, baseurl, options, container=None):
---
>     def instance(self, root, baseurl, options):
390c390
<         return Schema(root, baseurl, options, container)
---
>         return Schema(root, baseurl, options)
$ diff -b sxbasic.py /c/tmp/x/python-suds-0.3.9/suds/xsd/sxbasic.py
516d515
<                 self.schema.container.add(result)
537,538c536
<             log.debug('new instance for url=%s',url)
<             return self.schema.instance(root, url, options, self.schema.contai
ner)
---
>             return self.schema.instance(root, url, options)

comment:13 Changed 4 years ago by ghz

Hi, I would like to try these diffs. Which suds svn revision are they built against? Thanks

comment:14 Changed 4 years ago by ghz

Another possible example of the issue:

http://stackoverflow.com/questions/1351125/how-to-import-xsd-schema-with-python-suds-version-0-3-6-soap-library-typenotf

File "/export/home/gwilliams/suds/xsd/sxbasic.py", line 530, in open

result = self.download(options)

File "/export/home/gwilliams/suds/xsd/sxbasic.py", line 551, in download

return self.schema.instance(root, url, options)

File "/export/home/gwilliams/suds/xsd/schema.py", line 399, in instance

return Schema(root, baseurl, options, container)

File "/export/home/gwilliams/suds/xsd/schema.py", line 228, in init

self.open_imports(options)

File "/export/home/gwilliams/suds/xsd/schema.py", line 307, in open_imports

imported = imp.open(options)

File "/export/home/gwilliams/suds/xsd/sxbasic.py", line 530, in open

result = self.download(options)

File "/export/home/gwilliams/suds/xsd/sxbasic.py", line 551, in download

return self.schema.instance(root, url, options)

File "/export/home/gwilliams/suds/xsd/schema.py", line 399, in instance

return Schema(root, baseurl, options, container)

File "/export/home/gwilliams/suds/xsd/schema.py", line 228, in init

comment:15 Changed 4 years ago by jeremyross

This is a problem for salesforce also (#269). Since this ticket just passed it's first birthday, is it safe to assume that no one is interested in fixing?

comment:16 Changed 4 years ago by techtonik

  • Version changed from 0.3.6 to 0.4
  • Priority changed from major to blocker
  • Milestone 0.3.8 deleted

Still actual for 0.4

I increase the priority if you don't mind, because it is really blocker for me.

Changed 4 years ago by techtonik

fix for 0.4

comment:17 Changed 4 years ago by techtonik

Thanks to patricksurry for the hint. I've debugged into the same solution. Import stub calls locate() that looks up the schema in container, and if there is no container (and there will be no container in imported schemas) - it will return None and refetch definition.

I attached the fix without refactoring (I really don't like the implicit chain, and its not clear what kind of structure is being built). The fix basically the same as patricksurry made.

  • suds/xsd/schema.py

    # HG changeset patch
    # User anatoly techtonik <techtonik@gmail.com>
    # Date 1287746120 -10800
    # Node ID bb6892dd3f745e4934339a5fbb8ec120c347d427
    # Parent  3d1a6ced6029cf51818e0f20f1985e9718c50f59
    Fix recursive imports (issue #239) by passing current schema container
    to imported schemas. Without container reference Import.open() call to
    self.schema.locate() always returned None.
    
    diff -r 3d1a6ced6029 -r bb6892dd3f74 suds/xsd/schema.py
    a b  
    394394        @rtype: L{Schema} 
    395395        @note: This is only used by Import children. 
    396396        """ 
    397         return Schema(root, baseurl, options) 
     397        return Schema(root, baseurl, options, container=self.container) 
    398398 
    399399    def str(self, indent=0): 
    400400        tab = '%*s'%(indent*3, '') 

comment:18 Changed 4 years ago by ghz

Thanks for looking at this. Tried your patch but now some types are not resolved.

from suds.client import Client
wsdl = 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl'
client = Client(wsdl, cache=None)
  File "few.py", line 3, in <module>
    client = Client(wsdl, cache=None)
  File "/export/home/gwilliams/suds/client.py", line 112, in __init__
    self.wsdl = reader.open(url)
  File "/export/home/gwilliams/suds/reader.py", line 152, in open
    d = self.fn(url, self.options)
  File "/export/home/gwilliams/suds/wsdl.py", line 160, in __init__
    self.set_wrapped()
  File "/export/home/gwilliams/suds/wsdl.py", line 264, in set_wrapped
    raise TypeNotFound(query.ref)
suds.TypeNotFound: Type not found: '(OTA_AirPriceRQ, http://webservices.sabre.com/sabreXML/2003/07, )'

comment:19 Changed 3 years ago by csears

Greetings.

I found a workaround that helped me avoid this issue and might shed some light on the root cause.

suds.sax.parser.py is importing stuff from the built-in xml.sax module and uses those sax function for XML processing. Apparently, WSDL files with a moderate number of imports that reference each other can trigger very deep recursive sax function calls.

Initially, I thought it was some kind of import cycle with infinite depth, but (for me at least) it's not. I noticed some code in /usr/lib/python2.4/site-packages/_xmlplus/xslt/_4xslt.py that explicitly sets the python recursion limit to 10000. This seemed odd, but I gave it a try and my WSDL parsed without errors.

Here's how I tested it...

from suds.client import Client
import sys
sys.setrecursionlimit(10000)
c = Client('http://url.to/endpoint?wsdl', cache=None)

I'm attaching a script that tests a few different limits with a minimal WSDL file. I found that 5000 worked for me, but it's very dependent upon your WSDL.

I would note that this is not a fix. I don't know a lot about the internals of Suds, but I have to think that the SAX code could be structured differently to prevent the super deep recursion.

Also, your results may vary if you're using a newer version of python (I tested with 2.4) or have PyXML installed, which (I think) magically replaces the built-in xmlplus library.

Hope it helps someone out there.

Changed 3 years ago by csears

Test script illustrating setrecursionlimit() workaround

Changed 3 years ago by csears

Minimal WSDL file for testing setrecursionlimit() workaround. Save to /tmp

Changed 3 years ago by d0ugal

Example failing WSDL

comment:20 Changed 3 years ago by d0ugal

I was able to reproduce this problem with the Bing Maps search SOAP service. The wsdl can be downloaded from http://dev.virtualearth.net/webservices/v1/metadata/searchservice/dev.virtualearth.net.webservices.v1.search.wsdl I've also attached it for anybody that is working on this and needs to test.

Changed 3 years ago by waded

Patch to handle recursive imports

comment:22 follow-up: ↓ 23 Changed 3 years ago by waded

I tried the patch by techtonik, but also got the suds.TypeNotFound error that ghz did. I think the problem with always having the instance method return a Schema with container, is that the Schema.build() method is then never called for the imports, which results in missing attributes and elements.

There may be a better way, but the attached patch works for me:

attachment:schema.py.patch

comment:23 in reply to: ↑ 22 Changed 3 years ago by razamatan

waded's patch works for my wsdl use case.

comment:24 Changed 3 years ago by razamatan

  • Cc razamatan@… added

comment:25 Changed 3 years ago by razamatan

  • Cc razamatan@… removed

Changed 3 years ago by aronb

Patch based on WadeD's to allow a fixed number of schema loads per URL

comment:26 Changed 3 years ago by aronb

Submitted above patch to kludge the addition of levels of depth to waded's patch in order to fix situations in which one actually requires recursion. A better solution would place the max_depth configuration option into the client configuration options.

comment:28 in reply to: ↑ 27 ; follow-up: ↓ 29 Changed 2 years ago by dbonner

Replying to dbonner:

aronb's patch did the trick for https://adcenterapi.microsoft.com/Api/Advertiser/v8/CampaignManagement/CampaignManagementService.svc?wsdl

I'm still seeing some marshalling errors, but nothing a plugin can't handle.

comment:29 in reply to: ↑ 28 Changed 2 years ago by aparij

Replying to dbonner:

Replying to dbonner:

aronb's patch did the trick for https://adcenterapi.microsoft.com/Api/Advertiser/v8/CampaignManagement/CampaignManagementService.svc?wsdl

I'm still seeing some marshalling errors, but nothing a plugin can't handle.

What kind of errors do you see ? I also used aronb patch to fix adcenter soap and I suspect it breaks other things for example if I create Client() twice for this wsdl it will fail (other adcenter wsdl work fine)

client2 = Client('https://adcenterapi.microsoft.com/Api/Advertiser/V8/CampaignManagement/CampaignManagementService.svc?wsdl',
                             location='https://adcenterapi.microsoft.com/Api/Advertiser/V8/CampaignManagement/CampaignManagementService.svc',
                             )
client3 = Client('https://adcenterapi.microsoft.com/Api/Advertiser/V8/CampaignManagement/CampaignManagementService.svc?wsdl',
                             location='https://adcenterapi.microsoft.com/Api/Advertiser/V8/CampaignManagement/CampaignManagementService.svc',
                             )

  File "cl.py", line 16, in ?
    location='https://adcenterapi.microsoft.com/Api/Advertiser/V8/CampaignManagement/CampaignManagementService.svc',
  File "c:\Python24\lib\site-packages\suds\client.py", line 112, in __init__
    self.wsdl = reader.open(url)
  File "c:\Python24\lib\site-packages\suds\reader.py", line 152, in open
    d = self.fn(url, self.options)
  File "c:\Python24\lib\site-packages\suds\wsdl.py", line 158, in __init__
    self.set_wrapped()
  File "c:\Python24\lib\site-packages\suds\wsdl.py", line 262, in set_wrapped
    raise TypeNotFound(query.ref)
suds.TypeNotFound: Type not found: '(GetAdsByIdsRequest, https://adcenter.microsoft.com/v8, )

Last edited 2 years ago by aparij (previous) (diff)

comment:30 follow-up: ↓ 31 Changed 2 years ago by ghz

I tried the patch (Thanks!). In my case it prevents the initial problem, but I now get a suds.TypeNotFound? error. Unfortunately I don't have a public wsdl to demonstrate this.

comment:31 in reply to: ↑ 30 Changed 2 years ago by jpcampbell

Replying to ghz:

I tried the patch (Thanks!). In my case it prevents the initial problem, but I now get a suds.TypeNotFound? error. Unfortunately I don't have a public wsdl to demonstrate this.

I tried the patch as well and got the TypeNotFound? error. My WSDL is:

https://api.clarizen.com/v1.0/Clarizen.svc

suds.TypeNotFound?: Type not found: '(Result, http://clarizen.com/api, )'

comment:32 Changed 2 years ago by yann2791

The patch from aronb (recurselevel-schema.py.patch) worked like a charm for us. Thanks! Would it make it into the next release?

comment:33 Changed 19 months ago by skliarie

recurselevel-schema.py.patch did not help me, I still get "maximum recursion depth exceeded" on the publick WSDL:

#!/usr/bin/python

from suds.client import Client

client = Client("http://sms2.cdyne.com/sms.svc?wsdl") print client

comment:34 Changed 19 months ago by skliarie

  • Cc skliarie added

comment:35 Changed 18 months ago by obeleh

I find the solution a bit hacky. I want to propose the following fix:

https://github.com/obeleh/python-suds/pull/new/fabrique:master...obeleh:patch-1

Changed 11 months ago by thavidu

Improved patch that addresses TypeNotFound? as well

comment:36 Changed 11 months ago by thavidu

I improved on aronb's patch to address the TypeNotFound? error as well. The issue when attempting to import twice that since the previous patch had global vars in it, it wouldn't reset between fresh attempts, so it would actually stop the import on the first load of the second attempt and not import it at all (hence triggering the TypeNotFound? errors). With my patch, instead of returning None I cache the previous (successful) import and return that instead.

My patch is still pretty hacky tbh; ideally we should get rid of the global vars and track within the same set of containing instances, however this involves changing the base classes a lot more than just patching the one function as there is unfortunately no convenient reference up the tree (to the top most node, or any other convenient instance-based place to store the import tracking).

Confirmed working against the Bing Ads wsdl where it is really easy to hit the infinite recursion :)

Also, I am super surprised this issue still hasn't been fixed after 3 years (and after patches having been around for 1.5+ years as well), I guess SUDS is poorly maintained these days (although unfortunately all the other python soap libraries are worse or at best, just as bad)

FYI Obeleh's patch above did not work for me either.

Last edited 11 months ago by thavidu (previous) (diff)

comment:37 Changed 10 months ago by driscollis

I seem to be having the same issue that montyr had from 4 years ago with suds 4.1 beta in that my infinite recursion is occurring in the wsdl.py file rather than the schema.py script.

Here's a shortened trackback as the original was over 900 lines:

 RuntimeError: maximum recursion depth exceeded while pickling an object
File "c:\Users\mdriscoll\Documents\projects\test_soap\test_soap.py", line 112, in <module>
  main(sys.argv[1:])
File "c:\Users\mdriscoll\Documents\projects\test_soap\test_soap.py", line 100, in main
  sendSOAPMsg(agency, fax_id, fax_num, setxid)
File "c:\Users\mdriscoll\Documents\projects\test_soap\test_soap.py", line 32, in sendSOAPMsg
  client = Client('https://somerandomclient.com/blahblah.svc?wsdl')
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\client.py", line 112, in __init__
  self.wsdl = reader.open(url)
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\reader.py", line 152, in open
  d = self.fn(url, self.options)
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\wsdl.py", line 157, in __init__
  self.open_imports()
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\wsdl.py", line 202, in open_imports
  imp.load(self)
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\wsdl.py", line 314, in load
  d = Definitions(url, options)
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\wsdl.py", line 136, in __init__
  d = reader.open(url)
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\reader.py", line 80, in open
  cache.put(id, d)
File "c:\Users\mdriscoll\Documents\projects\test_soap\suds\cache.py", line 336, in put
  bfr = pickle.dumps(object, self.protocol)

Sadly I am working for a client that has me under an NDA so I can't reveal the wsdl at this time.

Note: See TracTickets for help on using tickets.