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. -- https://mail.python.org/mailman/listinfo/python-list