TypeError: list indices must be integers or slices, not str
This error means:
You'r trying to access a list using a string key, but only dictionaries can be accessed using string keys.