SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new with sharepoint and I have a problem with uploading files to my site. I am creating Python application communicating with sharepoint by SOAP webservices.

I was able to create new List called "data" and new list item with title "new_file.dat". It created an item with name "5_" and refering to file "5_.000" (which is not found now - 404). Now I want to append an attachement to it by this SOAP command

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
        <AddAttachment xmlns="">

The item id is 5 (I found it by GetListItems as ows_ID) and the attachement is only an example of base64 encoded string (the data file).

Here is the problem, the sharepoint still gives me an error 500 with errorstring: "Value does not fall within the expected range" and does not attached the file.

The way of sending the command is probably ok, because all other services works fine for me.

Thank you for any suggestions or hints what I do wrong.

share|improve this question
up vote 1 down vote accepted

Finally, I found the answer. The problem is that if I upload file to Documents it requires a method Copy.CopyIntoItems and adding attachement is not possible.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.