I just updated the Django 1.4 environment. When I start syncdb for the first time, I get the following error:
TypeError: decode() argument 1 must be string, not None
This error is triggered using django/contrib/auth/management/init
:
try: return getpass.getuser().decode(locale.getdefaultlocale()[1]) except (ImportError, KeyError, UnicodeDecodeError):
getdefaultlocale
returns None
After reading this Django ticket, I tried an unofficial patch that worked, but I think I could do better by figuring out what was going on.
So, I opened the python command line and tried:
import os print os.getenv() None os.getenv.__doc__ "Get an environment variable, return None if it doesn't exist.\n The optional second argument can specify an alternate default."
Can I solve this problem in OSX itself? Tips are welcome
source share