TypeError: expected str, bytes or os.PathLike object, not list

Hello everyone! I am a beginner and recently installed GUI DLC on my mac OS. I managed to create a project and extracted some frames. I also finished labelling my frames and clicked save, but there’s no .hdf or .csv file appear in ‘labelled data’ folder. The terminal window listed:

Traceback (most recent call last):
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/deeplabcut/gui/label_frames.py”, line 102, in label_frames
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/trainingsetmanipulation.py”, line 253, in label_frames
wd = Path(config).resolve().parents[0]
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/pathlib.py”, line 1001, in new
self = cls._from_parts(args, init=False)
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/pathlib.py”, line 656, in _from_parts
drv, root, parts = self._parse_args(args)
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/pathlib.py”, line 640, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not list
Traceback (most recent call last):
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py”, line 678, in saveDataSet
self.dataFrame = self.dataFrame.reindex(self.bodyparts, axis=1, level=self.dataFrame.columns.names.index(‘bodyparts’))
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/pandas/core/frame.py”, line 2733, in reindex
File “/Users/macbook/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/pandas/core/generic.py”, line 2494, in reindex
‘argument “{0}”’.format(list(kwargs.keys())[0]))
TypeError: reindex() got an unexpected keyword argument

Any help is deeply appreciated. Thank you in advance.

this means you likely have a typo in your config.yaml file - so check that carefully!

For the config.yaml file, I only edited and added in some body parts. I also copied the same bodyparts under “skeleton” and set the numframes2pick to 20. Everything else is still using the default settings. config.yaml (1.5 KB)

@ph39, what’s your pandas version?

It says pandas version 0.20.3

That version is more than 3 years old; you’d get rid of the reindex error by updating :slight_smile: