DeepLabCut / DeepLabCut-core

Headless DeepLabCut (no GUI support)
http://deeplabcut.org
GNU Lesser General Public License v3.0
30 stars 17 forks source link

UnboundLocalError: local variable 'cfg' referenced before assignment #21

Open RobertoEnrique opened 3 years ago

RobertoEnrique commented 3 years ago

Hi all,

I am having this issue when I attempt "dlc.extract_frames(config_path, crop = True" I am using Visual Studio Code as a text editor instead of ATOM, could this be the source of the problem? It seems to be in the config.yaml and I even tried it using an old config file that used to work

KonradDanielewski commented 3 years ago

It's an error connected to improper formatting of the project path or an error in project path in config.yaml

Can you share a path to your project and a screenshot of the config.yaml (top part with the project path)?

RobertoEnrique commented 3 years ago

Yes. What I do to get to the project is:

config_path = '/home/dubouelab/Roberto/Aggression-Videos-2021-02-04/Side_Videos/Resident-Intruder-Assay-Roberto-2021-02-06'

Here are 2 screenshots of the path and the error it is throwing:

20210520_110850 20210520_111003

KonradDanielewski commented 3 years ago

Please post screenshot of your config.yaml file. This part: image

RobertoEnrique commented 3 years ago

Ok, here it is: 20210521_093415

KonradDanielewski commented 3 years ago

The config_path variable is different than your project_path. I assume you moved the project and the project_path variable needs to be updated in the config.

RobertoEnrique commented 3 years ago

That solved it... wow, what a silly mistake! I'm still new to all this. But thanks so much!