#26686: django.core.checks.model_checks _check_lazy_references raises TypeError
with NoneType model_key
-------------------------------------+-------------------------------------
     Reporter:  bretth               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (System         |                  Version:  1.10
  checks)                            |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by bretth):

 Attached my throwaway project. model-utils isn't in installed apps (it
 doesn't need to be)
 pip install django-model-utils (and django 1.10a).

 ./manage.py makemigrations demoapp
 {{{
 Traceback (most recent call last):
   File "./manage.py", line 22, in <module>
     execute_from_command_line(sys.argv)
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/management/__init__.py", line 367, in
 execute_from_command_line
     utility.execute()
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/management/__init__.py", line 359, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/management/base.py", line 305, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/management/base.py", line 353, in execute
     self.check()
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/management/base.py", line 385, in check
     include_deployment_checks=include_deployment_checks,
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/management/base.py", line 372, in _run_checks
     return checks.run_checks(**kwargs)
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/checks/registry.py", line 81, in run_checks
     new_errors = check(app_configs=app_configs)
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/checks/model_checks.py", line 156, in
 check_lazy_references
     return _check_lazy_references(apps)
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/checks/model_checks.py", line 151, in
 _check_lazy_references
     )), key=lambda error: error.msg)
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/checks/model_checks.py", line 150, in <genexpr>
     for func in apps._pending_operations[model_key]
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/checks/model_checks.py", line 145, in
 build_error
     return error_fn(model_key, func, args, keywords) if error_fn else None
   File "/Users/bretth/projects/_virtualenvs/django-typeerror/lib/python3.5
 /site-packages/django/core/checks/model_checks.py", line 117, in
 signal_connect_error
     'model': '.'.join(model_key or ''),
 TypeError: sequence item 0: expected str instance, NoneType found
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26686#comment:2>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.9b9b8ec907227edc7d095885785d942a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to