Dataloader is failing after few batches. Unable to understand the error

Navya: <p>Traceback (most recent call last):<br>
File “/home/ubuntu/Desktop/new_origami/Origami/origami/scripts/train_pdbbind.py”, line 124, in <br>
main()<br>
File “/home/ubuntu/Desktop/new_origami/Origami/origami/scripts/train_pdbbind.py”, line 100, in main<br>
for idx, data in enumerate(train_loader):<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch/utils/data/dataloader.py”, line 521, in <strong>next</strong><br>
data = self._next_data()<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch/utils/data/dataloader.py”, line 1183, in _next_data<br>
return self._process_data(data)<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch/utils/data/dataloader.py”, line 1229, in _process_data<br>
data.reraise()<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch/_utils.py”, line 434, in reraise<br>
raise exception<br>
AttributeError: Caught AttributeError in DataLoader worker process 22.<br>
Original Traceback (most recent call last):<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py”, line 287, in _worker_loop<br>
data = fetcher.fetch(index)<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py”, line 52, in fetch<br>
return self.collate_fn(data)<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch_geometric/loader/dataloader.py”, line 34, in <strong>call</strong><br>
return [self(s) for s in zip(*batch)]<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch_geometric/loader/dataloader.py”, line 34, in <br>
return [self(s) for s in zip(*batch)]<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch_geometric/loader/dataloader.py”, line 34, in <strong>call</strong><br>
return [self(s) for s in zip(*batch)]<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch_geometric/loader/dataloader.py”, line 34, in <br>
return [self(s) for s in zip(*batch)]<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch_geometric/loader/dataloader.py”, line 19, in <strong>call</strong><br>
return Batch.from_data_list(batch, self.follow_batch,<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch_geometric/data/batch.py”, line 68, in from_data_list<br>
batch, slice_dict, inc_dict = collate(<br>
File “/home/ubuntu/anaconda3/envs/origami/lib/python3.9/site-packages/torch_geometric/data/collate.py”, line 46, in collate<br>
for store in data.stores:<br>
AttributeError: ‘str’ object has no attribute ‘stores’</p>

srishti-git1110: <p>You should probably thoroughly check your data. As of now, does your code expect <code>data</code> to be a dataframe of which stores is some column?</p>
<p>Anyway, as can be clearly seen in the error log, some data point was encountered where <code>data</code> was a string object and hence the error.</p>

Navya: <p>Thank you! I rechecked my datapoints in the dataloader there was an error. It is working now!</p>