Opened 6 years ago
Closed 6 years ago
#29666 closed Bug (needsinfo)
TypeError: create_superuser() takes exactly 4 arguments (3 given)
Reported by: | bw2 | Owned by: | Jeff |
---|---|---|---|
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 (last modified by )
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
as expected, but then also raises this error:
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)
Change History (6)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 6 years ago
I got the same TTY exception running this in my terminal, but did not receive the second error. Could you provide some more information on your system, where you ran the command, and copy paste the I/O for me?
comment:4 by , 6 years ago
It's strange the issue was opened against version 2.1 but the traceback shows things running under Python 2.7.
comment:5 by , 6 years ago
very true. I ran with python3 on master and saw no sign of the TypeError. Starting to sound like this may not be a real issue. bw2, can you confirm you were using python2.7 and on version 2.1?
comment:6 by , 6 years ago
Component: | Uncategorized → contrib.auth |
---|---|
Resolution: | → needsinfo |
Status: | assigned → closed |
Type: | Uncategorized → Bug |
I couldn't reproduce on Django 1.11. Maybe a custom user model and an incorrectly written user manager is the cause?
I'll look at this