Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:14:02+00:00 2026-06-04T18:14:02+00:00

What may be going on here? This is a problem on two separate Macs

  • 0

What may be going on here? This is a problem on two separate Macs of mine – one Eclipse install and one Aptana Studio. After I answer “yes” to create a superuser the first time I Sync DB, I get these errors.

Performing Sync db outside of PyDev (via terminal, etc) seems to work fine.

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
“/Users/mac2/Documents/workspace/helloworld/manage.py”, line 10, in

execute_from_command_line(sys.argv) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py”,
line 443, in execute_from_command_line
utility.execute() File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py”,
line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py”,
line 196, in run_from_argv
self.execute(*args, **options.dict) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py”,
line 232, in execute
output = self.handle(*args, **options) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py”,
line 371, in handle
return self.handle_noargs(**options) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py”,
line 110, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db) File
“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py”,
line 189, in emit_post_sync_signal
interactive=interactive, db=db) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py”,
line 172, in send
response = receiver(signal=self, sender=sender, **named) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/init.py”,
line 73, in create_superuser
call_command(“createsuperuser”, interactive=True, database=db) File
“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py”,
line 150, in call_command
return klass.execute(*args, **defaults) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py”,
line 232, in execute
output = self.handle(*args, **options) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py”, line 70, in handle
default_username = get_default_username() File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/init.py”,
line 105, in get_default_username
default_username = get_system_username() File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/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 Finished
“/Users/mac2/Documents/workspace/helloworld/manage.py syncdb”
execution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:14:04+00:00Added an answer on June 4, 2026 at 6:14 pm

    The error returned indicates that the call to decode is failing with a None argument:

    "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/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 Finished
    

    The problem there is that locale.getdefaultlocale() returns a tuple with the environment variable LANG (see http://docs.python.org/library/locale.html). If you open terminal, where syncdb works, and type echo $LANG, my guess is you’ll get something like en_US.UTF-8. Similarly, I imagine Python on your command line returns something like this:

    >>> import locale
    >>> locale.getdefaultlocale()
    ('en_US', 'UTF-8')
    

    However, if you run that same command from within Eclipse, where the LANG environment variable isn’t set, you get (None, None).

    Try setting the LANG environment variable in Eclipse (Run Configurations… > Environment), and then running syncdb. You might have to play a bit with where the variable is set (i.e., in the Run Config versus the Project itself). Does that fix the problem?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem may be a little broad, but I'm going to go ahead and
This may be super simple - but I'm struggling to spot what's going on.
This may have been asked already, but I can't find it, so here goes.
I have an interesting problem to solve here that may require some creative direction.
I hope somebody may be able to point out where i'm going wrong here
This issue may have be raised here before, but I am not confident that
Possible Duplicate: substring and the indexOf method I have this problem that I'm going
I have a problem with the Facebook API. I may not be going the
This may be a problem somewhere else in my code, but I hope there's
Simple question, the answer may not be... I'm going to be developing a web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.