Opened 6 years ago
Last modified 6 years ago
#29666 closed Bug
TypeError: create_superuser() takes exactly 4 arguments (3 given) — at Initial Version
Reported by: | bw2 | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | 2.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Running
echo 'bla' | python -u manage.py createsuperuser --username test --email test
prints
Superuser creation skipped due to not running in a TTY. You can run manage.py createsuperuser
in your project to create one manually.
but then also shows the following error message:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/weisburd/Library/Python/2.7/lib/python/site-packages/django/core/management/init.py", line 363, in execute_from_command_line
utility.execute()
File "/Users/weisburd/Library/Python/2.7/lib/python/site-packages/django/core/management/init.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/weisburd/Library/Python/2.7/lib/python/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, cmd_options)
File "/Users/weisburd/Library/Python/2.7/lib/python/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 63, in execute
return super(Command, self).execute(*args, options)
File "/Users/weisburd/Library/Python/2.7/lib/python/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, options)
File "/Users/weisburd/Library/Python/2.7/lib/python/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 183, in handle
self.UserModel._default_manager.db_manager(database).create_superuser(user_data)
TypeError: create_superuser() takes exactly 4 arguments (3 given)