python-package-template icon indicating copy to clipboard operation
python-package-template copied to clipboard

ImportError: cannot import name '_unicodefun' from 'click'

Open hirotosuzuki opened this issue 2 years ago • 2 comments

🐛 Bug Report

This error occurs.

make pre-commit-install
> ImportError: cannot import name '_unicodefun' from 'click'

https://github.com/psf/black/issues/2964 I can fix by this command

poetry add click==8.0.2

hirotosuzuki avatar Sep 03 '22 14:09 hirotosuzuki

This is also fixed by upgrading black in your project. https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click I would just upgrade the black version in your local project in the poetry files.

It would also probably make sense to upgrade black in the cookie cutter template

dschonholtz avatar Sep 08 '22 13:09 dschonholtz

You can also pin the click package in the .toml file by setting

click = "8.0.2"

fengwang avatar Oct 22 '22 11:10 fengwang