Question: If I use any of the CRUD methods of SocialDataService (eg: AddComment), I find that even once the POST has returned successfully SharePoint has not actually processed the change. By that I mean that a quick call to GetCommentsOnUrl will return the old data, even though I am clearly making my request only after receiving a reply.

**Is there a specific delay time I can wait to be sure SP has had time to process the change?** If I'm using AJAX to perform changes to a page (which could in the meantime have also been changed by other users) I'd like to present the most up-to-date version, so how long do I wait before re-polling the web service?

edit: longer than 1 second, less than 1.5 is this a server setting or something?

Answer: 
The exception `TypeError: 'NoneType' object is not subscriptable` happens because the value of `lista` is actually `None`. You can reproduce `TypeError` that you get in your code if you try this at the Python command line:

```
None[0]

```

The reason that `lista` gets set to None is because the return value of `list.sort()` is `None`... it does *not* return a sorted copy of the original list. Instead, as the [documentation points out](http://docs.python.org/tutorial/datastructures.html#more-on-lists), the list gets sorted **in-place** instead of a copy being made (this is for efficiency reasons).

If you do not want to alter the original version you can use

```
other_list = sorted(lista)

```
As previously said in one of the answers this error occurs when value of the list turns out to be empty. Well though not fully relevant to this question, the same error occured for me while reading images using opencv and numpy because the file name was found to be different than that specified probably or because the working directory has not been specified properly.