AttributeError 'int' object has no attribute 'split'

Raised by:

django/template/defaultfilters.py (line 616)

Traceback (most recent call last):
  File "python2.7/site-packages/django/core/handlers/base.py", line 137, in get_response
    response = response.render()
  File "python2.7/site-packages/django/template/response.py", line 103, in render
    self.content = self.rendered_content
  File "python2.7/site-packages/django/template/response.py", line 80, in rendered_content
    content = template.render(context)
  File "python2.7/site-packages/django/template/base.py", line 148, in render
    return self._render(context)
  File "python2.7/site-packages/django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "python2.7/site-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "python2.7/site-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "python2.7/site-packages/django/template/loader_tags.py", line 126, in render
    return compiled_parent._render(context)
  File "python2.7/site-packages/django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "python2.7/site-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "python2.7/site-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "python2.7/site-packages/django/template/loader_tags.py", line 65, in render
    result = block.nodelist.render(context)
  File "python2.7/site-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "python2.7/site-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "python2.7/site-packages/django/template/defaulttags.py", line 312, in render
    return nodelist.render(context)
  File "python2.7/site-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "python2.7/site-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "python2.7/site-packages/django/template/loader_tags.py", line 145, in render
    for name, var in six.iteritems(self.extra_context)
  File "python2.7/site-packages/django/template/loader_tags.py", line 145, in <dictcomp>
    for name, var in six.iteritems(self.extra_context)
  File "python2.7/site-packages/django/template/base.py", line 624, in resolve
    new_obj = func(obj, *arg_vals)
  File "python2.7/site-packages/django/template/defaultfilters.py", line 616, in slice_filter
    for x in arg.split(':'):
AttributeError: 'int' object has no attribute 'split'

How to reproduce

Try to pass an integer to the template tag split. In your templates:

{{ some_array|split:3 }}

How to fix

Always pass strings to split template tag:

{{ some_array|split:'3' }}