Deeplabcut: Extract frames returns a PermissionError and an IndexError

Created on 21 Jul 2019  路  5Comments  路  Source: DeepLabCut/DeepLabCut

Microsoft Windows 10 with DeepLabCut version 2.0.7
Browser: Chrome

Describe the problem
When attempting to extract frames from a newly made project, I am given both a PermissionError and an IndexError.
I am operating in an administrator account and run the Anaconda prompt as an administrator, so that is not the issue.

How to Reproduce the problem
I copied the lines of code to do so below, but essentially, after I am in iPython, I import deeplabcut and use the extract_frames function.

Code
Python 3.6.8 |Anaconda, Inc.| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 6.0.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import deeplabcut as dlc

In [2]: config_path = r'C:\Users\r_laser\Desktop\Grooming DLC 7.20.19\Grooming 7.21.19-RSL-2019-07-21'

In [3]: dlc.extract_frames(config_path,'automatic','kmeans')

PermissionError Traceback (most recent call last)
c:users\r_laser\appdata\local\continuum\anaconda3\envs\dlc-windowsgpu\lib\site-packages\deeplabcut\utils\auxiliaryfunctions.py in read_config(configname)
116 try:
--> 117 with open(path, 'r') as f:
118 cfg = ruamelFile.load(f)

PermissionError: [Errno 13] Permission denied: 'C:\Users\r_laser\Desktop\Grooming DLC 7.20.19\Grooming 7.21.19-RSL-2019-07-21'

During handling of the above exception, another exception occurred:

IndexError Traceback (most recent call last)
in ()
----> 1 dlc.extract_frames(config_path,'automatic','kmeans')

c:users\r_laser\appdata\local\continuum\anaconda3\envs\dlc-windowsgpu\lib\site-packages\deeplabcut\generate_training_dataset\frame_extraction.py in extract_frames(config, mode, algo, crop, userfeedback, cluster_step, cluster_resizewidth, cluster_color, opencv, slider_width)
104 elif mode == "automatic":
105 config_file = Path(config).resolve()
--> 106 cfg = auxiliaryfunctions.read_config(config_file)
107 print("Config file read successfully.")
108

c:users\r_laser\appdata\local\continuum\anaconda3\envs\dlc-windowsgpu\lib\site-packages\deeplabcut\utils\auxiliaryfunctions.py in read_config(configname)
118 cfg = ruamelFile.load(f)
119 except Exception as err:
--> 120 if err.args[2] == "could not determine a constructor for the tag '!!python/tuple'":
121 with open(path, 'r') as ymlfile:
122 cfg = yaml.load(ymlfile,Loader=yaml.SafeLoader)

IndexError: tuple index out of range

Additional context
Tensorflow-GPU version 1.10
CUDA version 9.0
CuDNN version 7.6
-I am currently using the supplied dlc-windowsGPU environment, but I also made my own environment according to the directions and see the same error come up.
-The only changes I have made to the config file are changing resnet to 101 and changing the label names.

Thank you for any assistance, and please let me know if I am missing any information that can help!

question

All 5 comments

Should be: : config_path = r'C:\Users\r_laser\Desktop\Grooming DLC 7.20.19\Grooming 7.21.19-RSL-2019-07-21\config.yaml'

And delete: '!!python/tuple'":

That is old

Running into the same issue, are you suggesting deleting the !!python/tuple check from read_config() in deeplabcut\utils\auxiliaryfunctions.py (e.g. line 120)?

Delete from the config.yaml if it鈥檚 there; that鈥檚 an old config file style

@rlaser7 can you confirm that it loads with: In [2]: config_path = r'C:\Users\r_laser\Desktop\Grooming DLC 7.20.19\Grooming 7.21.19-RSL-2019-07-21*config.yaml*'?

Apologies for the delay! Yes, that worked. Thank you for your assisstence.

Was this page helpful?
0 / 5 - 0 ratings