Problems with the tutorial: can't create superuser

When i tried to follow the tutorial for pycharm I ran into the following problmes when I tryied to run syncdb:

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 "/Applications/", line 21, in <module>
    run_module(manage_file, None, '__main__', True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 176, in run_module
    fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/Users/rogerkueng/Dropbox/Programming/Python/MyDjangoApp/", line 10, in <module>
  File "/Library/Python/2.7/site-packages/django/core/management/", line 443, in execute_from_command_line
  File "/Library/Python/2.7/site-packages/django/core/management/", line 382, in execute
  File "/Library/Python/2.7/site-packages/django/core/management/", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.7/site-packages/django/core/management/", line 232, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.7/site-packages/django/core/management/", line 371, in handle
 return self.handle_noargs(**options)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/", line 110, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive, db)
  File "/Library/Python/2.7/site-packages/django/core/management/", line 189, in emit_post_sync_signal
    interactive=interactive, db=db)
  File "/Library/Python/2.7/site-packages/django/dispatch/", line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/Library/Python/2.7/site-packages/django/contrib/auth/management/", line 73, in create_superuser
    call_command("createsuperuser", interactive=True, database=db)
  File "/Library/Python/2.7/site-packages/django/core/management/", line 150, in call_command
 return klass.execute(*args, **defaults)
  File "/Library/Python/2.7/site-packages/django/core/management/", line 232, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.7/site-packages/django/contrib/auth/management/commands/", line 70, in handle
    default_username = get_default_username()
  File "/Library/Python/2.7/site-packages/django/contrib/auth/management/", line 105, in get_default_username
    default_username = get_system_username()
  File "/Library/Python/2.7/site-packages/django/contrib/auth/management/", line 85, in get_system_username
 return getpass.getuser()
TypeError: decode() argument 1 must be string, not None

Process finished with exit code 1

What could be the problem? Do I need any additional modules or what could be the problem? I just installed the latest version of PyCharm (2.6.3) and the inside the app I installed django.

Any help would be appreciated.
1 comment
Comment actions Permalink
Unfortunately you've run into a Django bug that is fixed in Django 1.5:
The comments for the issue include a number of workarounds that will help you get past this problem.

Please sign in to leave a comment.