raise AttributeError on __getitem__