First time here? Check out the FAQ!

Revision history  [back]

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 '

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

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 '

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