This error is raised, if you try to index a 1-dimensional tensor with any other index than 0 or -1:
x = torch.randn(10)
x.index_select(0, torch.tensor(0)) # works
x.index_select(-1, torch.tensor(0)) # works
x.index_select(1, torch.tensor(0)) # yields your error