12đź‘Ť
I had the same. In PyCharm I had made a directory “locale” (with a __init__.py
for no reason whatsoever) for my internationalisation and got this message:
AttributeError: module 'locale' has no attribute 'normalize'
This is due to the fact it is looking for a Python module “locale” but that is masked by your Django directory “locale”.
Either remove the __init__.py
and/or rename your directory “locale”. I did both… “To stitch something twice is to stich it well” as we say in Holland.
It seems that everywhere on the net people use “locale” as directory for their internationlization. Hmm.. it now seems to me a bit like making a class with the name “Class” or a SQL table with the name “Table”. I have seen in done, at times it works, I would never recommend it though.