News Aggregator: NoneType' does not support indexing?

Hi @andrea.vivante,

Thanks for providing the clone link.

The error TypeError: ‘NoneType’ does not support indexing was caused by the Data Binding of the category_label in your ArticleView Form trying to use square brackets on something that’s None.

The Data Binding was self.item['category']['name']. In this instance self.item is an article from your database and one of the articles didn’t have a category linked, so the value of self.item['category'] is None. Therefore, trying to use square brackets on it will produce the error you’re seeing.

For more information, my colleague Meredydd explained this in more depth here:

If you add a category to the article row that is missing it, your error will be solved.

3 Likes