Locale error in manage.py createsuperuser
Recently, when I run python manage.py createsuperuser, I run into this problem
TypeError: decode() argument 1 must be string, not None
Frustrated, I traced back why this is happening. It turns out that Python cannot detect default locale in my system. Therefore, locale.getdefaultlocale() is returning None and hence, causing the error. The solution is to set some locale variables in my environment.
Now, createsuperuser command runs successfully.