Updating SharePoint List items REST API - Bad parameter passed to Web Server Extensions

Katherine Hughes 1 Reputation point
2022-06-16T10:14:41.367+00:00

I have a Python script (snippet below) that I've been running for months that uses shareplum to update various columns of a SharePoint List. It has suddenly stopped working and I've no idea why. The script runs without any errors but the changes are not made. Creating a new List item is working fine, it's only when I try to update an existing List item. I'm able to update columns of other Lists using the same script so it must be an issue with this particular List. I checked the result of the response, which says: '0x80070057', Bad parameter passed to Web Server Extensions.

I am able to use Office365-REST-Python-Client to update the list items of the List in question but I'd love to know why I'm having this issue with the shareplum script and if there's an issue with my List.

from shareplum import Site  
from shareplum import Office365  
      
  
authcookie = Office365('https://XXX.sharepoint.com', username= XXX, password= XXX).GetCookies()  
site = Site('https://XXX.sharepoint.com/sites/XXX', authcookie=authcookie)  
list_ = site.List('TestList')  
  
my_data = [{'ID': '3', 'Title': 'TestTitle'}]  
list_.UpdateListItems(data=my_data, kind='Update')  
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,251 Reputation points
    2022-06-17T01:33:39.01+00:00

    Hi @Katherine Hughes ,

    Our forum mainly discuss about SharePoint development using C#, as your issue is about Python, we suggest you create a new thread on techcommunity for help.

    techcommunity :

    https://techcommunity.microsoft.com/t5/sharepoint-developer/bd-p/SharePointDev


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.