Troubleshooting

Crash on multi-threading

On macOS, flake8 might raise this error when calling requests.get(url):

objc[93329]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[93329]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

To solve this issue, add this environment variable to .bashrc (or the initialization file for your favorite shell):

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Thanks to this StackOverflow answer.

ModuleNotFoundError: No module named ‘nitpick.plugins.XXX’

When upgrading to new versions, old plugins might be renamed in setuptools entry points.

But they might still be present in the entry_points.txt plugin metadata in your virtualenv.

$ rg nitpick.plugins.setup ~/Library/Caches/pypoetry/
/Users/john.doe/Library/Caches/pypoetry/virtualenvs/nitpick-UU_pZ5zs-py3.6/lib/python3.6/site-packages/nitpick-0.24.1.dist-info/entry_points.txt
11:setup_cfg=nitpick.plugins.setup_cfg

Remove and recreate the virtualenv; this should fix it.

During development, you can run invoke clean --venv install --dry. It will display the commands that would be executed; remove --dry to actually run them.

Read this page on how to install Invoke.

Executable .tox/lint/bin/pylint not found

You might get this error while running make locally.

  1. Run invoke lint (or tox -e lint directly) to create this tox environment.

  2. Run make again.