I tried to reproduce your issue with:
import torch

g = torch.Generator()
g.manual_seed(1)
indices = torch.randperm(100, generator=g).tolist()

It ran without error (I am on PyTorch 1.0.0).
Can you try to give me a reproduction so that I can help figure out what’s going on?