Newb having issues labeling frames

I’ve just started working with a test video and upon running the frame labeling GUI I receive the following error:

AttributeError: module ‘wx’ has no attribute ‘Thread_IsMain’

Here is the traceback

In [4]: deeplabcut.label_frames(config_path)
An exception has occurred, use %tb to see the full traceback.

SystemExit: This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.

/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/core/ UserWarning: To exit: use ‘exit’, ‘quit’, or Ctrl-D.
warn(“To exit: use ‘exit’, ‘quit’, or Ctrl-D.”, stacklevel=1)

In [5]:
Traceback (most recent call last):
File “/anaconda3/envs/dlc-macOS-CPU/bin/ipython”, line 11, in
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/”, line 125, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/traitlets/config/”, line 658, in launch_instance
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/terminal/”, line 353, in start
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/terminal/”, line 459, in mainloop
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/terminal/”, line 442, in interact
code = self.prompt_for_code()
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/terminal/”, line 355, in prompt_for_code
pre_run=self.pre_prompt, reset_current_buffer=True)
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/prompt_toolkit/”, line 415, in run, self.create_eventloop_callbacks())
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/prompt_toolkit/eventloop/”, line 102, in run
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/prompt_toolkit/eventloop/”, line 74, in call_inputhook
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/terminal/”, line 474, in inputhook
File “/anaconda3/envs/dlc-macOS-CPU/lib/python3.6/site-packages/IPython/terminal/pt_inputhooks/”, line 75, in inputhook_wx2
assert wx.Thread_IsMain()
AttributeError: module ‘wx’ has no attribute ‘Thread_IsMain’

If you suspect this is an IPython bug, please report it at:
or send an email to the mailing list at

You can print a more detailed traceback right now with “%tb”, or use “%debug”
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True

(dlc-macOS-CPU) wifi-131-179-36-88:~ jobu$ 4;1R

Please see the user guide instructions, but in short, with Mac you need to launch the program with pythonw (not ipython).

Details here:

Thanks – I was just following the user guide directly, which indicates ipython… sorry, I’m not at all experienced with terminal/python.

Using pythonnw now… having issues getting past the initial new_project step, receiving “TypeError: create_new_project() missing 1 required positional argument: ‘videos’”… wasn’t having an issue with the same line of code when using ipython. Any ideas?


you don’t have to re-create the project, fyi, you can just point back the config file.

Anyhow, without seeing what you typed in, I don’t know the error. There is otherwise no difference between in using the code with pythonw

Try to follow this example, but with paths to your own video files (on Mac you can drag the file/folder to terminal and it will automatically create the path)


import deeplabcut


if you already have your new project with it’s designated folders and yaml file made, then when you want to reference it you just need to:

import deeplabcut

The path being wherever you have this config file in your directory. Might look like config_path=’/Users/jobu/desktop/deeplabcut/project01-Jobu-2019-06-24/config.yaml’

Thanks for your assistance! I was able to get things running this morning and learning is in process!


Things seem to working well… thanks for all your help! Will post again when issues arise!

J. Burda

1 Like