This is because the datasets library returns a slice of the dataset as a dictionary with lists for each key. The data collator however expects a list of dataset elements, so a list of dictionaries. Practically, I think you need to do:
samples = [tokenized_traindata[i] for i in range(8)]
batch = data_collator(samples)