Catalogue
black "ImportError: cannot import name _unicodefun from click" Error Fix

black "ImportError: cannot import name _unicodefun from click" Error Fix

🌐 日本語で読む

I ran into the following error with the Python auto-formatting tool black, so here is a summary of how I dealt with it.

1
2
3
4
5
6
$ black . --check --skip-string-normalization

Traceback (most recent call last):
...
ImportError: cannot import name '_unicodefun' from 'click' ...
...

Referring to the resource below, I confirmed that upgrading black to the latest version 22.3.0 resolves the issue.

The root cause is that an internal module of black installs click (version 8.1.3 in my own environment), and the problem stems from a bug in it.

That’s all.
I hope this is helpful.

black "ImportError: cannot import name _unicodefun from click" Error Fix

https://kenzo0107.github.io/en/2022/05/25/black-fix-cannot-import-name-unicodefun-from-click/

Author

Kenzo Tanaka

Posted on

2022-05-25

Licensed under