[Fedora-suds-list] Schema Unavailable

Sean DiZazzo half.italian at gmail.com
Tue May 24 18:08:02 UTC 2011


Hi,

It looks to me as if the caching system in version 0.4.0 is broken, and any
code run is reaching out to www.w3.org for the xsd files on every execution.

cache.get() returns a string, but when it is used in DocumentReader.open()
it expects a parsed sax object.

Without debugging on, it fails quietly and creates a zero length cache file.
 Then when it tries to use the zero-byte cache it fails with a cryptic
message.

If you need a patch, please let me know.

Once that was fixed, I was able to turn on caching in my script and get
around the problem of www.w3.org not giving up the xsd documents in a timely
manner.

~Sean


On Thu, May 19, 2011 at 3:45 PM, Sean DiZazzo <half.italian at gmail.com>wrote:

> Hi,
>
> I have some code that has been working quite well for some time.  In the
> past two days, however, I have been getting an error.  I think this is
> happening when suds is reaching out to www.w3.org for a schema file.  It
> looks like www.w3.org has been a bit unreliable, and thats causing suds to
> break.
>
> My question is...how can I set suds up so it looks to a local file for the
> schema.  I plan to download the schema and put it somewhere where the box
> will always be able to see it, but I don't know how to do that in suds.  Can
> i set the location of an Import() using "file:///" semantics?
>
> It seems crazy that suds reaches out every time for the same schema file,
> when it could just be stored locally.
>
> Thanks in advance.
>
> ~Sean DiZazzo
>
> DEBUG:suds.wsdl:reading wsdl at:
> https://xxx/sites/xxx/_vti_bin/Lists.asmx?WSDL ...
> DEBUG:suds.transport.http:opening (
> https://xxx/sites/xxx/_vti_bin/Lists.asmx?WSDL)
> DEBUG:suds.metrics:sax (<addinfourl at 182971837400 whose fp =
> <httplib.HTTPResponse instance at 0x2a99f8ac20>>) duration: 98 (ms)
> DEBUG:suds.xsd.sxbasic:Import:0x2a9a59dc50, importing ns="
> http://www.w3.org/2001/XMLSchema", location="
> http://www.w3.org/2001/XMLSchema.xsd"
> DEBUG:suds.transport.http:opening (http://www.w3.org/2001/XMLSchema.xsd)
> DEBUG:suds.metrics:sax (<addinfourl at 182980277456 whose fp =
> <socket._fileobject object at 0x2a9a5c65d0>>) duration: 448 (ms)
> DEBUG:suds.xsd.sxbasic:Import:0x2a9a854390, importing ns="
> http://www.w3.org/XML/1998/namespace", location="
> http://www.w3.org/2001/xml.xsd"
> DEBUG:suds.transport.http:opening (http://www.w3.org/2001/xml.xsd)
> ERROR:suds.xsd.sxbasic:Import:0x2a9a854390, imported schema (
> http://www.w3.org/XML/1998/namespace) at (http://www.w3.org/2001/xml.xsd),
> failed
> Traceback (most recent call last):
>   File "build/bdist.linux-x86_64/egg/suds/xsd/sxbasic.py", line 533, in
> download
>     d = reader.open(url)
>   File "build/bdist.linux-x86_64/egg/suds/reader.py", line 73, in open
>     d = self.download(url)
>   File "build/bdist.linux-x86_64/egg/suds/reader.py", line 88, in download
>     fp = self.options.transport.open(Request(url))
>   File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 61, in
> open
>     return  HttpTransport.open(self, request)
>   File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 70, in
> open
>     raise TransportError(str(e), e.code, e.fp)
> TransportError: HTTP Error 503: Service Unavailable
> Traceback (most recent call last):
>   File "FastTrackSharepoint.py", line 186, in <module>
>     connection = FastTrackSharepoint(user='xxx', passwd='xxx', wsdl='
> https://xxx/sites/xxx/_vti_bin/Lists.asmx?WSDL', debug=True)
>   File "FastTrackSharepoint.py", line 33, in __init__
>     self.client = client.Client(url=wsdl, transport=ntlm)
>   File "build/bdist.linux-x86_64/egg/suds/client.py", line 129, in __init__
>   File "build/bdist.linux-x86_64/egg/suds/reader.py", line 136, in open
>   File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 159, in __init__
>   File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 220, in
> build_schema
>   File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 92, in load
>   File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 298, in
> open_imports
>   File "build/bdist.linux-x86_64/egg/suds/xsd/sxbasic.py", line 515, in
> open
>   File "build/bdist.linux-x86_64/egg/suds/xsd/sxbasic.py", line 536, in
> download
>   File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 390, in
> instance
>   File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 219, in
> __init__
>   File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 298, in
> open_imports
>   File "build/bdist.linux-x86_64/egg/suds/xsd/sxbasic.py", line 515, in
> open
>   File "build/bdist.linux-x86_64/egg/suds/xsd/sxbasic.py", line 540, in
> download
> Exception: imported schema (http://www.w3.org/XML/1998/namespace) at (
> http://www.w3.org/2001/xml.xsd), failed
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/suds/attachments/20110524/b0b483c3/attachment.html 


More information about the suds mailing list