ValueError dictionary update sequence element #0 has length 1; 2 is required

Raised by:

django/core/urlresolvers.py (line 324)

Traceback (most recent call last):
  File "python3.5/site-packages/django/core/handlers/base.py", line 174, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "python3.5/site-packages/django/core/handlers/base.py", line 172, in get_response
    response = response.render()
  File "python3.5/site-packages/django/template/response.py", line 160, in render
    self.content = self.rendered_content
  File "python3.5/site-packages/django/template/response.py", line 137, in rendered_content
    content = template.render(context, self._request)
  File "python3.5/site-packages/django/template/backends/django.py", line 95, in render
    return self.template.render(context)
  File "python3.5/site-packages/django/template/base.py", line 206, in render
    return self._render(context)
  File "python3.5/site-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "python3.5/site-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "python3.5/site-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "python3.5/site-packages/django/template/loader_tags.py", line 173, in render
    return compiled_parent._render(context)
  File "python3.5/site-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "python3.5/site-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "python3.5/site-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "python3.5/site-packages/django/template/defaulttags.py", line 499, in render
    url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
  File "python3.5/site-packages/django/core/urlresolvers.py", line 600, in reverse
    return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
  File "python3.5/site-packages/django/core/urlresolvers.py", line 448, in _reverse_with_prefix
    self._populate()
  File "python3.5/site-packages/django/core/urlresolvers.py", line 324, in _populate
    dict(defaults, **pattern.default_kwargs),
ValueError: dictionary update sequence element #0 has length 1; 2 is required

How to reproduce

Remove the name kwarg from the url pattern.

url(r'^$', MyView.as_view(), 'view_name')

How to fix

Add the name kwarg to the url pattern

url(r'^$', MyView.as_view(), name='view_name')