First time here? Check out the FAQ!
1

Haystack's real time indexing causes errors

Adding the following line for real time indexing causes the errors below.

HAYSTACK_SIGNAL_PROCESSOR = 'askbot.search.haystack.signals.AskbotRealtimeSignalProcessor'

Any suggestions?

====================================================================== ERROR: test_load_full_object_description_works (askbot.tests.page_load_tests.CommandViewTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/page_load_tests.py", line 691, in test_load_full_object_description_works post = models.Post.objects.create_new_tag_wiki(post_params) File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/models/post.py", line 188, in create_new_tag_wiki post_type = 'tag_wiki' File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/models/post.py", line 235, in create_new parse_results = post.parse_and_save(author=author, is_private=is_private) File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/models/post.py", line 529, in parse_and_save super(self.__class__, self).save(kwargs) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/django/db/models/base.py", line 565, in save_base created=(not record_exists), raw=raw, using=using) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send response = receiver(signal=self, sender=sender, **named) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/haystack/signals.py", line 47, in handle_save index.update_object(instance, using=using) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/haystack/indexes.py", line 266, in update_object backend.update(self, [instance]) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/haystack/backends/solr_backend.py", line 49, in update docs.append(index.full_prepare(obj))
File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/haystack/indexes.py", line 196, in full_prepare self.prepared_data = self.prepare(obj) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/haystack/indexes.py", line 187, in prepare self.prepared_data[field.index_fieldname] = field.prepare(obj) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/haystack/fields.py", line 223, in prepare return self.convert(super(IntegerField, self).prepare(obj)) File "/home/a/virtualenv/4hou4ken/local/lib/python2.7/site-packages/haystack/fields.py", line 97, in prepare raise SearchFieldError("The model '%s' has an empty model_attr '%s' and doesn't allow a default or null value." % (repr(obj), attr)) SearchFieldError: The model '<post:< p=""> </post:<>

some text

' has an empty model_attr 'thread' and doesn't allow a default or null value.

====================================================================== ERROR: test_save_object_description_works (askbot.tests.page_load_tests.CommandViewTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/page_load_tests.py", line 718, in test_save_object_description_works self.assertEqual(group.description.text, 'some description') AttributeError: 'NoneType' object has no attribute 'text'

---------------------------------------------------------------------- Ran 5 tests in 3.517s

FAILED (errors=2) Destroying test database for alias 'default' ('test_forum')...

apg's avatar
167
apg
asked 2013-09-26 19:29:36 -0500, updated 2013-09-26 19:30:44 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Data validation error, will be fixed soon.

Fitoria's avatar Fitoria (2013-09-27 11:09:27 -0500) edit
add a comment see more comments

1 Answer

2

Fixed in this commit

Fitoria's avatar
1.1k
Fitoria
answered 2013-09-27 15:38:15 -0500
edit flag offensive 0 remove flag delete link

Comments

@Fitoria Thank you! I just confirmed it worked with me.

apg's avatar apg (2013-09-27 23:58:06 -0500) edit
add a comment see more comments