Error while rebuilding the index

Issue #375 new
Anonymous created an issue

ERROR 2013-11-13 20:32:26,525 whoosh_backend 15922 140735167304064

Exception while preparing object for update
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/haystack/backends/whoosh_backend.py", line 191, in update
    writer.update_document(**doc)
  File "/Library/Python/2.7/site-packages/whoosh/writing.py", line 1024, in update_document
    self._record("update_document", args, kwargs)
  File "/Library/Python/2.7/site-packages/whoosh/writing.py", line 1001, in _record
    getattr(self.writer, method)(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/whoosh/writing.py", line 477, in update_document
    self.add_document(**fields)
  File "/Library/Python/2.7/site-packages/whoosh/writing.py", line 729, in add_document
    perdocwriter.start_doc(docnum)
  File "/Library/Python/2.7/site-packages/whoosh/codec/whoosh3.py", line 201, in start_doc
    raise Exception("Called start_doc when already in a doc")
Exception: Called start_doc when already in a doc

Comments (6)

  1. rogaha

    Hi Matt,

    I'm trying to rebuild_index. I have imported the data table from another DB and I'm trying to rebuild it after that. The command rebuild_index worked before I import that table data.

  2. Vikrant Sharma

    I faced the same issue "Called start_doc when already in a doc". I found out that it was because I was passing an str value while it was expecting unicode. Changing those values to unicode resolved it for me.

  3. Log in to comment