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 | $ black . --check --skip-string-normalization |
Referring to the resource below, I confirmed that upgrading black to the latest version 22.3.0 resolves the issue.
Incompatible with click 8.1.0 (ImportError: cannot import name '_unicodefun' from 'click') · Issue #2964 · psf/black
Please use Black 22.3.0 (or newer) which was just released to fix this issue or pin Click to 8.0.0, 8.0.1, 8.0.2, 8.0.3, or 8.0.4. ~ @ichard…
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/