TL; DR: try setting client.options.prettyxml = True before trying your first update call.
Holy hell, I struggled with an apparently identical problem all day. Assuming you used a similar version of suds (suds_jurko 0.5 here), the answer to the question is "how best to debug this?". to some extent, it was recorded:
import logging logging.basicConfig(level=logging.INFO) logging.getLogger('suds.client').setLevel(logging.DEBUG) logging.getLogger('suds.transport').setLevel(logging.DEBUG)
There is an error in the sax / elements file (or next to it) that calls the element.plain () function to consider the element empty. When client.options.prettyxml is False, SoapClient.send () tries to use the plain () method for the sax file instead of the str () method. The result of this was that the element was parsed as empty, which caused UpdateListItems to crash with the error "The value does not fall within the expected range."
Example:
MESSAGE: b'<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <ns0:Body> <ns1:UpdateListItems> <ns1:listName>B5E50422-D16B-4C5F-AE19-CFBE943C6F3F</ns1:listName> <updates/> </ns1:UpdateListItems> </ns0:Body> </SOAP-ENV:Envelope>'
Note that the GetListItems () methods "worked" for me because the saxophone placed an empty request element in this SOAP request that was technically accurate.
To get around this, make SoapClient.send () use the "pretty" version by adding client.options.prettyxml = True somewhere before you call the first service.
I did not notice the error, because I apparently checked my SOAP object before it was crippled; the inclusion of the journal led to a change in the last minute.
(I understand that this is an old question, not sure if it frowned, but it was the closest that I could find in my real problem earlier and felt that he deserved an answer)
source share