I created my own torch geometric graph classification dataset. However, I encounter the following problem:
Traceback (most recent call last):
  File "/snap/pycharm-community/240/plugins/python-ce/helpers/pydev/pydevd.py", line 1483, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/snap/pycharm-community/240/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/eitank/GraphVid/train_kinetics.py", line 207, in <module>
    args=args
  File "/home/eitank/GraphVid/train_kinetics.py", line 119, in train_video_recognition
    batch_splitter=classification_batch_splitter,
  File "/home/eitank/GraphVid/utils/PackageUtils/TorchUtils.py", line 168, in fit
    batch_splitter=batch_splitter, )
  File "/home/eitank/GraphVid/utils/PackageUtils/TorchUtils.py", line 263, in do_epoch
    for iteration, batch in enumerate(data_iter):
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
    data = self._next_data()
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
    return self.collate_fn(data)
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch_geometric/data/dataloader.py", line 36, in __call__
    return self.collate(batch)
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch_geometric/data/dataloader.py", line 31, in collate
    return [self.collate(s) for s in zip(*batch)]
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch_geometric/data/dataloader.py", line 31, in <listcomp>
    return [self.collate(s) for s in zip(*batch)]
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch_geometric/data/dataloader.py", line 17, in collate
    self.exclude_keys)
  File "/home/eitank/anaconda3/envs/torch/lib/python3.7/site-packages/torch_geometric/data/batch.py", line 151, in from_data_list
    batch[key] = torch.cat(items, cat_dim)
TypeError: expected Tensor as element 40 in argument 0, but got NoneType

How can I find the cause? I checked if the value returned with my dataset is None, and it isn’t.