On Wed, Nov 9, 2011 at 3:24 PM, Niels <[email protected]> wrote:
> Is this a known bug?
>
> csh .. > python 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
>
> 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 9, in <module>
>    execute_from_command_line(sys.argv)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/__init__.py",
>  line 422, in execute_from_command_line
>    utility.execute()
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/__init__.py",
>  line 361, in execute
>    self.fetch_command(subcommand).run_from_argv(self.argv)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/base.py", 
> line 191, in run_from_argv
>    self.execute(*args, **options.__dict__)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/base.py", 
> line 222, in execute
>    output = self.handle(*args, **options)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/base.py", 
> line 355, in handle
>    return self.handle_noargs(**options)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/commands/syncdb.py",
>  line 109, in handle_noargs
>    emit_post_sync_signal(created_models, verbosity, interactive, db)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/sql.py", 
> line 189, in emit_post_sync_signal
>    interactive=interactive, db=db)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/dispatch/dispatcher.py", 
> line 172, in send
>    response = receiver(signal=self, sender=sender, **named)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/contrib/auth/management/__init__.py",
>  line 73, in create_superuser
>    call_command("createsuperuser", interactive=True)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/__init__.py",
>  line 148, in call_command
>    return klass.execute(*args, **defaults)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/core/management/base.py", 
> line 222, in execute
>    output = self.handle(*args, **options)
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/contrib/auth/management/commands/createsuperuser.py",
>  line 63, in handle
>    default_username = get_default_username()
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/contrib/auth/management/__init__.py",
>  line 105, in get_default_username
>    default_username = get_system_username()
>  File 
> "/usr/local/www/site-python/lib/django-trunk/django/contrib/auth/management/__init__.py",
>  line 85, in get_system_username
>    return getpass.getuser().decode(locale.getdefaultlocale()[1])
> TypeError: decode() argument 1 must be string, not None
>
> This is just from a normal useracccount logged in through ssh:
>
> csh .. > id
> uid=1001(admin) gid=1001(admin) groups=1001(admin)
> csh .. > uname -or
> FreeBSD 9.0-RC2
> csh .. > svn info /usr/local/www/site-python/lib/django-trunk/django
> Path: /usr/local/www/site-python/lib/django-trunk/django
> Working Copy Root Path: /usr/local/www/site-python/lib/django-trunk
> URL: https://code.djangoproject.com/svn/django/trunk/django
> Repository Root: https://code.djangoproject.com/svn
> Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
> Revision: 17077
> Node Kind: directory
> Schedule: normal
> Last Changed Author: ramiro
> Last Changed Rev: 17077
> Last Changed Date: 2011-11-07 12:28:31 +0100 (Mon, 07 Nov 2011)
>
> csh .. > _

What locale are you in (output of locale(1) would be handy)? You
should be able to reproduce this without django, django just makes
assumptions that you have a sane locale set:

Python 2.7.1 (r271:86832, Dec 13 2010, 15:52:15)
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('en_GB', 'UTF-8')

You will probably get ('something', None) returned from yours?

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to