DJANGO cannot import name _compare_digest
Thomas Jollans
tjol at tjol.eu
Wed Jun 28 16:31:32 EDT 2017
On 28/06/17 21:52, Xristos Xristoou wrote:
>
>
> hello i have python 7.13
>
> DJANGO 1.11.2 version
>
> django-crypto 0.20 version on windows 10.
>
> i want to create a DJANGO app but anytime to try to migrate i take
>
> that error :
>
> from django.utils.crypto import get_random_string
> File "C:\Python27\lib\site-packages\django\utils\crypto.py", line 8, in <module>
> import hmac
> File "C:\Python27\Lib\hmac.py", line 8, in <module>
> from operator import _compare_digest as compare_digest
> ImportError: cannot import name _compare_digest
>
> how to fix it ?
>
Do you have a file called "operator.py"? If so, it's shadowing the
standard library module "operator". Rename it.
More information about the Python-list
mailing list