#32017: TypeError: check() got an unexpected keyword argument 'databases'
------------------------------------------------+------------------------
               Reporter:  Stian Jensen          |          Owner:  nobody
                   Type:  Bug                   |         Status:  new
              Component:  Core (System checks)  |        Version:  3.1
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 When updating from django 3.0.10 to 3.1.0 (also 3.1.1), I get a new error
 when running management commands that involve running system checks.
 The whole stack trace involves only django code (no other third-party
 packages), so I assume this cannot be related to other packages I have
 installed.

 I saw something in the release notes about a new --database flag to the
 check command, but I cannot piece together if it has anything to do with
 this error (Running manage.py check with '--database default' does not
 remove the crash, for instance).

 {{{
 .venv/bin/python manage.py check
 Traceback (most recent call last):
   File "manage.py", line 22, in <module>
     execute_from_command_line(sys.argv)
   File "app/.venv/lib/python3.8/site-
 packages/django/core/management/__init__.py", line 401, in
 execute_from_command_line
     utility.execute()
   File "app/.venv/lib/python3.8/site-
 packages/django/core/management/__init__.py", line 395, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "app/.venv/lib/python3.8/site-
 packages/django/core/management/base.py", line 330, in run_from_argv
     self.execute(*args, **cmd_options)
   File "app/.venv/lib/python3.8/site-
 packages/django/core/management/base.py", line 371, in execute
     output = self.handle(*args, **options)
   File "app/.venv/lib/python3.8/site-
 packages/django/core/management/commands/check.py", line 63, in handle
     self.check(
   File "app/.venv/lib/python3.8/site-
 packages/django/core/management/base.py", line 392, in check
     all_issues = checks.run_checks(
   File "app/.venv/lib/python3.8/site-
 packages/django/core/checks/registry.py", line 70, in run_checks
     new_errors = check(app_configs=app_configs, databases=databases)
   File "app/.venv/lib/python3.8/site-
 packages/django/core/checks/model_checks.py", line 34, in check_all_models
     errors.extend(model.check(**kwargs))
   File "app/.venv/lib/python3.8/site-packages/django/db/models/base.py",
 line 1264, in check
     *cls._check_fields(**kwargs),
   File "app/.venv/lib/python3.8/site-packages/django/db/models/base.py",
 line 1343, in _check_fields
     errors.extend(field.check(**kwargs))
 TypeError: check() got an unexpected keyword argument 'databases'
 }}}
 (I stripped out some of the absolute paths to file names that should be
 irrelevant from the traceback)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32017>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.8dfb1f049ab87299c4662edfaa86344b%40djangoproject.com.

Reply via email to