title: Can't rebuild indexes in django-haystack
body: <p>I've installed Apache Solr 4.10.4, django-haystack 2.4.0, pysolr 3.3.2 and Django 1.8.6. I'm finishing make a simple blog application in Django framework. I typed following command in terminal:</p>
  
  <p><code>(my_env) pecan@tux ~/Documents/Django/mysite $ python manage.py rebuild_index</code></p>
  
  <p>but it return me an error:</p>
  
  <pre><code>WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.
  Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
  Are you sure you wish to continue? [y/N] y
  Removing all documents from your index because you said so.
  All documents removed.
  Indexing 3 posts
  ERROR:root:Error updating blog using default 
  Traceback (most recent call last):
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1080, in _escape_attrib
      if "&amp;" in text:
  TypeError: argument of type 'int' is not iterable
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/update_index.py", line 188, in handle_label
      self.update_backend(label, using)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/update_index.py", line 233, in update_backend
      do_update(backend, index, qs, start, end, total, verbosity=self.verbosity, commit=self.commit)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/update_index.py", line 96, in do_update
      backend.update(index, current_qs, commit=commit)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/backends/solr_backend.py", line 75, in update
      self.conn.add(docs, commit=commit, boost=index.get_field_weights())
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/pysolr.py", line 807, in add
      m = ET.tostring(message, encoding='utf-8')
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1125, in tostring
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 777, in write
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 942, in _serialize_xml
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 942, in _serialize_xml
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 934, in _serialize_xml
      v = _escape_attrib(v)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1092, in _escape_attrib
      _raise_serialization_error(text)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1058, in _raise_serialization_error
      "cannot serialize %r (type %s)" % (text, type(text).__name__)
  TypeError: cannot serialize 1 (type int)
  Traceback (most recent call last):
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1080, in _escape_attrib
      if "&amp;" in text:
  TypeError: argument of type 'int' is not iterable
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "manage.py", line 22, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
      utility.execute()
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/django/core/management/__init__.py", line 346, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/django/core/management/base.py", line 394, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
      output = self.handle(*args, **options)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/rebuild_index.py", line 26, in handle
      call_command('update_index', **options)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/django/core/management/__init__.py", line 120, in call_command
      return command.execute(*args, **defaults)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
      output = self.handle(*args, **options)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/update_index.py", line 183, in handle
      return super(Command, self).handle(*items, **options)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/django/core/management/base.py", line 623, in handle
      label_output = self.handle_label(label, **options)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/update_index.py", line 188, in handle_label
      self.update_backend(label, using)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/update_index.py", line 233, in update_backend
      do_update(backend, index, qs, start, end, total, verbosity=self.verbosity, commit=self.commit)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/management/commands/update_index.py", line 96, in do_update
      backend.update(index, current_qs, commit=commit)
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/haystack/backends/solr_backend.py", line 75, in update
      self.conn.add(docs, commit=commit, boost=index.get_field_weights())
    File "/home/pecan/Documents/Django/my_env/lib/python3.4/site-packages/pysolr.py", line 807, in add
      m = ET.tostring(message, encoding='utf-8')
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1125, in tostring
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 777, in write
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 942, in _serialize_xml
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 942, in _serialize_xml
      short_empty_elements=short_empty_elements)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 934, in _serialize_xml
      v = _escape_attrib(v)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1092, in _escape_attrib
      _raise_serialization_error(text)
    File "/usr/lib64/python3.4/xml/etree/ElementTree.py", line 1058, in _raise_serialization_error
      "cannot serialize %r (type %s)" % (text, type(text).__name__)
  TypeError: cannot serialize 1 (type int)
  </code></pre>
  
  <p>I had to install older versions of packages and Solr because my book is a bit ancient.</p>
  
  <p>Can anybody help me?</p>