Skip to content

Instantly share code, notes, and snippets.

@ascott1
Created October 14, 2014 19:59
Show Gist options
  • Select an option

  • Save ascott1/5e470c21fe3d46eea606 to your computer and use it in GitHub Desktop.

Select an option

Save ascott1/5e470c21fe3d46eea606 to your computer and use it in GitHub Desktop.
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.
Failed to clear Solr index: Failed to connect to server at 'http://localhost:8983/solr/update/?commit=true', are you sure that URL is correct? Checking it in a browser might help: [Errno 111] Connection refused
All documents removed.
Indexing 242951 regulations
ERROR:root:Error updating regcore using default
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 221, in handle_label
self.update_backend(label, using)
File "/usr/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 267, in update_backend
do_update(backend, index, qs, start, end, total, self.verbosity)
File "/usr/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 89, in do_update
backend.update(index, current_qs)
File "/usr/lib/python2.6/site-packages/haystack/backends/solr_backend.py", line 68, in update
self.conn.add(docs, commit=commit, boost=index.get_field_weights())
File "/usr/lib/python2.6/site-packages/pysolr.py", line 770, in add
message.append(self._build_doc(doc, boost=boost))
File "/usr/lib/python2.6/site-packages/pysolr.py", line 725, in _build_doc
field = ET.Element('field', **attrs)
File "lxml.etree.pyx", line 2336, in lxml.etree.Element (src/lxml/lxml.etree.c:46576)
TypeError: Element() keywords must be strings
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.6/site-packages/haystack/management/commands/rebuild_index.py", line 16, in handle
call_command('update_index', **options)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 159, in call_command
return klass.execute(*args, **defaults)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 195, in handle
return super(Command, self).handle(*items, **options)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 385, in handle
label_output = self.handle_label(label, **options)
File "/usr/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 221, in handle_label
self.update_backend(label, using)
File "/usr/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 267, in update_backend
do_update(backend, index, qs, start, end, total, self.verbosity)
File "/usr/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 89, in do_update
backend.update(index, current_qs)
File "/usr/lib/python2.6/site-packages/haystack/backends/solr_backend.py", line 68, in update
self.conn.add(docs, commit=commit, boost=index.get_field_weights())
File "/usr/lib/python2.6/site-packages/pysolr.py", line 770, in add
message.append(self._build_doc(doc, boost=boost))
File "/usr/lib/python2.6/site-packages/pysolr.py", line 725, in _build_doc
field = ET.Element('field', **attrs)
File "lxml.etree.pyx", line 2336, in lxml.etree.Element (src/lxml/lxml.etree.c:46576)
TypeError: Element() keywords must be strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment