Ask Your Question
1

Haystack's real time indexing causes errors

asked 2013-09-26 19:29:36 -0600

apg gravatar image

updated 2013-09-26 19:30:44 -0600

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')...

edit retag flag offensive close merge delete

Comments

Data validation error, will be fixed soon.

Fitoria gravatar imageFitoria ( 2013-09-27 11:09:27 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-09-27 15:38:15 -0600

Fixed in this commit

edit flag offensive delete link more

Comments

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

apg gravatar imageapg ( 2013-09-27 23:58:06 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-09-26 19:29:36 -0600

Seen: 725 times

Last updated: Sep 27 '13