‘MyClass’ object has no attribute ‘__getitem__’

item is not a dictionary but a class so it has different syntax for accessing members. Access id this way instead:

item.id

Leave a Comment