I keep running into errors of the form: “type object ‘TabularDataset’ has no attribute”:
def tokenize_text(text):
   return [letter for letter in text]

TEXT = Field(tokenize=tokenize_text,
         eos_token = '<eos>')

train_datafields = [("SRC", TEXT), 
              ("TRG", TEXT)]

train_data, valid_data = TabularDataset.splits( 
    train = 'train.csv',
    validation = 'valid.csv',
     format = 'csv',
     skip_header = True,
     fields = train_datafields)

specific error in this case is: “type object ‘TabularDataset’ has no attribute ‘name’”
However, if I do the following:
def tokenize_text(text):
    return [letter for letter in text]

TEXT = Field(tokenize=tokenize_text,
         eos_token = '<eos>')

 train_datafields = [("SRC", TEXT), 
              ("TRG", TEXT)]


train_data = TabularDataset(
        path= "train.csv",
        format='csv',
        skip_header=True, 
        fields=train_datafields)

TEXT.build_vocab(train_data, min_freq = 2)

Batch_size = 128
train_iterator = BucketIterator.splits((train_data), 
                      batch_size = Batch_size)

I get the following error: “AttributeError: ‘Example’ object has no attribute ‘sort_key’”