mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-25 23:55:57 +03:00
[GH-ISSUE #25] locale.getdefaultlocale error #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jonjo on GitHub (Feb 27, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/25
./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
Creating table virtmgr_host
Creating table virtmgr_vm
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 14, in
execute_manager(settings)
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 459, in execute_manager
utility.execute()
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, _options)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(_options)
File "/usr/lib64/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 "/usr/lib64/python2.7/site-packages/django/core/management/sql.py", line 189, in emit_post_sync_signal
interactive=interactive, db=db)
File "/usr/lib64/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, *_named)
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/management/init.py", line 73, in create_superuser
call_command("createsuperuser", interactive=True, database=db)
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 150, in call_command
return klass.execute(_args, *_defaults)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 70, in handle
default_username = get_default_username()
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/management/init.py", line 105, in get_default_username
default_username = get_system_username()
File "/usr/lib64/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
@retspen commented on GitHub (Feb 27, 2013):
$ rm webvirtmgr.db
$ export LC_ALL=C
$ export LANG=C
$ ./manage.py syncdb
@jonjo commented on GitHub (Feb 27, 2013):
vesta webvirtmgr # rm webvirtmgr.db
vesta webvirtmgr # export LC_ALL=C
vesta webvirtmgr # export LANG=C
vesta webvirtmgr # ./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
Creating table virtmgr_host
Creating table virtmgr_vm
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 14, in
execute_manager(settings)
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 459, in execute_manager
utility.execute()
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, _options)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(_options)
File "/usr/lib64/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 "/usr/lib64/python2.7/site-packages/django/core/management/sql.py", line 189, in emit_post_sync_signal
interactive=interactive, db=db)
File "/usr/lib64/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, *_named)
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/management/init.py", line 73, in create_superuser
call_command("createsuperuser", interactive=True, database=db)
File "/usr/lib64/python2.7/site-packages/django/core/management/init.py", line 150, in call_command
return klass.execute(_args, *_defaults)
File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 70, in handle
default_username = get_default_username()
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/management/init.py", line 105, in get_default_username
default_username = get_system_username()
File "/usr/lib64/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
@jonjo commented on GitHub (Feb 27, 2013):
downgraded to dev-python/django-1.3.7 and it worked
@retspen commented on GitHub (Feb 27, 2013):
Django-1.4.x - ?
@jonjo commented on GitHub (Feb 27, 2013):
was not working on 1.4.5
@retspen commented on GitHub (Feb 27, 2013):
not tested on Django-1.4.5 but on Django-1.4.2 - work fine