Kaggle keeps giving me a TypeError: ‘NoneType’ object is not iterable for the below code:
dls = DataBlock(
blocks=(ImageBlock, CategoryBlock),
get_items=get_image_files,
splitter=RandomSplitter(valid_pct=0.2, seed=42),
get_y=parent_label,
item_tfms=[Resize(192, method='squish')]
).dataloaders(path_to_images, bs=32)
dls.show_batch(max_n=6)
This is the full notebook:
I have tried changing the environment of the notebook, but I’m not sure how to fix it. The code worked fine on another notebook, but for this one, it just spazzed out.
New contributor
Michael Ye is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.