id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 18160 Auth - Unknown Encoding Error when syncdb anonymous nobody "When I was running `./manage.py syncdb` (with sqlite3), a LookupError shows up as follow. I filed a patch to fix it. In the UnitTest, I made `import locale` as inline (Or should I import it at the beggining of the file?) {{{ bash $ ./manage.py syncdb Creating tables ... Creating table auth_permission Creating table auth_group_permissions Creating table auth_group Creating table auth_user_user_permissions Creating table auth_user_groups Creating table auth_user Creating table django_content_type Creating table django_session Creating table django_site Creating table django_admin_log You just installed Django's auth system, which means you don't have any superusers defined. Would you like to create one now? (yes/no): yes Traceback (most recent call last): File ""./manage.py"", line 13, in execute_from_command_line(sys.argv) File ""/Users/yippee/projects/YEditor/server/django/core/management/__init__.py"", line 443, in execute_from_command_line utility.execute() File ""/Users/yippee/projects/YEditor/server/django/core/management/__init__.py"", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File ""/Users/yippee/projects/YEditor/server/django/core/management/base.py"", line 196, in run_from_argv self.execute(*args, **options.__dict__) File ""/Users/yippee/projects/YEditor/server/django/core/management/base.py"", line 232, in execute output = self.handle(*args, **options) File ""/Users/yippee/projects/YEditor/server/django/core/management/base.py"", line 371, in handle return self.handle_noargs(**options) File ""/Users/yippee/projects/YEditor/server/django/core/management/commands/syncdb.py"", line 110, in handle_noargs emit_post_sync_signal(created_models, verbosity, interactive, db) File ""/Users/yippee/projects/YEditor/server/django/core/management/sql.py"", line 189, in emit_post_sync_signal interactive=interactive, db=db) File ""/Users/yippee/projects/YEditor/server/django/dispatch/dispatcher.py"", line 172, in send response = receiver(signal=self, sender=sender, **named) File ""/Users/yippee/projects/YEditor/server/django/contrib/auth/management/__init__.py"", line 73, in create_superuser call_command(""createsuperuser"", interactive=True, database=db) File ""/Users/yippee/projects/YEditor/server/django/core/management/__init__.py"", line 150, in call_command return klass.execute(*args, **defaults) File ""/Users/yippee/projects/YEditor/server/django/core/management/base.py"", line 232, in execute output = self.handle(*args, **options) File ""/Users/yippee/projects/YEditor/server/django/contrib/auth/management/commands/createsuperuser.py"", line 70, in handle default_username = get_default_username() File ""/Users/yippee/projects/YEditor/server/django/contrib/auth/management/__init__.py"", line 105, in get_default_username default_username = get_system_username() File ""/Users/yippee/projects/YEditor/server/django/contrib/auth/management/__init__.py"", line 85, in get_system_username return getpass.getuser().decode(locale.getdefaultlocale()[1]) LookupError: unknown encoding: x-mac-simp-chinese }}} Thanks, mitnk " Bug new contrib.auth dev Normal Unreviewed 1 0 0 0 0 0