Error using split_by_files: argument of type 'ItemLists' is not iterable

Hi there!

I’m trying to use split_by_files when creating my databunch

split_by_files (valid_names : ItemList)

I’ve created an ItemList for that purpose

ItemList_valid = (ImageList.from_csv(path, ‘validcsv.csv’,
folder=‘images/images’, cols=0, suffix=’.png’)

I’ve checked it was the correct type


But when pass it through split_by_files:

src = (ImageList.from_csv(path, ‘pokemon.csv’, cols=0, folder=‘images/images’, suffix=’.png’)
.split_by_files(valid_names= ItemList_valid)

I get this error:

TypeError: argument of type ‘ItemLists’ is not iterable

Any ideas why?