TypeError: __init__() missing 2 required positional arguments: 'doc' and 'pos'
🐛 Bug
raceback (most recent call last):
  File "main.py", line 305, in <module>
    main(hparams)
  File "main.py", line 179, in main
    trainer.fit(model, datamodule=video_datamodule)
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 440, in fit
    results = self.accelerator_backend.train()
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/accelerators/ddp_slurm_accelerator.py", line 59, in train
    self.ddp_train(process_idx=self.task_idx, model=model)
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/accelerators/ddp_slurm_accelerator.py", line 179, in ddp_train
    results = self.train_or_test()
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/accelerators/accelerator.py", line 68, in train_or_test
    results = self.trainer.train()
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 485, in train
    self.train_loop.run_training_epoch()
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 537, in run_training_epoch
    for batch_idx, (batch, is_last_batch) in train_dataloader:
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/profiler/profilers.py", line 80, in profile_iterable
    value = next(iterator)
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 47, in _with_is_last
    for val in it:
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in __next__
    data = self._next_data()
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 838, in _next_data
    return self._process_data(data)
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 881, in _process_data
    data.reraise()
  File "/mnt/lustre/maxiao1/anaconda3/lib/python3.7/site-packages/torch/_utils.py", line 395, in reraise
    raise self.exc_type(msg)
TypeError: __init__() missing 2 required positional arguments: 'doc' and 'pos'

can someone give suggestion about this problem?   my dataset will load one image and one json file on each getitem, if I only load image, it will be ok. But if I load image and json file, it will throw this error randomly. It doesn't show that it's because json file's problem, and I have tested all json file, they can  open normally. I can't figure out what causes this bug.