Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 19, 2010 19:04:33

Daniel F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Haystack error rebuinding index


Hi all
I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu
10.10) using python 2.6.6, but now when I try to rebuild the index I get the
following error:
AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'

ProfileIndex is my index, I didn't created a full_prepare atribute, but I
wonder that haystack created that for me, right?
Anyone has any idea where can be the error? and how can I fix it?

my Django version: 1.2.3

Best Regardds,
Daniel França

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 20, 2010 23:21:43

Daniel F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Haystack error rebuinding index


anyone?

2010/12/19 Daniel França <daniel.fra...@gmail.com>

> Hi all
> I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu
> 10.10) using python 2.6.6, but now when I try to rebuild the index I get the
> following error:
> AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'
>
> ProfileIndex is my index, I didn't created a full_prepare atribute, but I
> wonder that haystack created that for me, right?
> Anyone has any idea where can be the error? and how can I fix it?
>
> my Django version: 1.2.3
>
> Best Regardds,
> Daniel França
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 21, 2010 05:01:05

Sam L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Haystack error rebuinding index


2010/12/21 Daniel França <daniel.fra...@gmail.com>:
> anyone?
>
> 2010/12/19 Daniel França <daniel.fra...@gmail.com>
>>
>> Hi all
>> I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu
>> 10.10) using python 2.6.6, but now when I try to rebuild the index I get the
>> following error:
>> AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'
>> ProfileIndex is my index, I didn't created a full_prepare atribute, but I
>> wonder that haystack created that for me, right?

full_prepare is a method in the SearchIndex class in Haystack. Does
ProfileIndex inherit from SearchIndex?

Maybe haystack isn't installed properly and Python can't find the
SearchIndex class? Although that should be a different error I
believe.

>> Anyone has any idea where can be the error? and how can I fix it?
>>
>> my Django version: 1.2.3
>> Best Regardds,
>> Daniel França
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Dec. 21, 2010 17:30:10

Daniel F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Haystack error rebuinding index


Hi, here's my search index:

import datetime
from haystack import indexes
from haystack import site
from profiles.models import Profile

class ProfileIndex(indexes.SearchIndex):
text = indexes.CharField(use_template=True, document=True)
first_name = indexes.CharField(model_attr='first_name')
last_name = indexes.CharField(model_attr='last_name')
about = indexes.CharField(model_attr='about')
interests = indexes.CharField(model_attr='interests')

def get_queryset(self):
return Profile.objects.all()

site.register(Profile, ProfileIndex)

I don't know if it helps, but here's my profile_text.txt

{{ object.user.username }}
{{ object.first_name }}
{{ object.last_name }}

and my Profile model

class Profile(models.Model):

user = models.ForeignKey(User, unique=True, verbose_name=_('user'))
first_name = models.CharField(_('first_name'), max_length=30,
null=False, default='')
last_name = models.CharField(_('last_name'), max_length=70, null=False,
default='')
age = models.IntegerField(_('age'), null=True)
about = models.TextField(_('about'), null=True, blank=True)
interests = models.TextField(_('interests'), null=True, blank=True)
birth_date = models.DateField(_('birth_date'), null=False,
default='1900-01-01')
location = models.CharField(_('location'), max_length=40, null=True,
blank=True)
state = models.CharField(_('state'), choices=STATE_CHOICE,
max_length=40, null=True, blank=True)
country = models.CharField(_('country'), max_length=40, null=True,
blank=True)
website = models.URLField(_('website'), null=True, blank=True)
account_type = models.ForeignKey(AccountType, verbose_name=('account
type'), null=True)


and it was working at Mac, so I believe it's a misconfiguration or
misinstallation

On Tue, Dec 21, 2010 at 3:00 AM, Sam Lai <samuel....@gmail.com> wrote:

> 2010/12/21 Daniel França <daniel.fra...@gmail.com>:
> > anyone?
> >
> > 2010/12/19 Daniel França <daniel.fra...@gmail.com>
> >>
> >> Hi all
> >> I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu
> >> 10.10) using python 2.6.6, but now when I try to rebuild the index I get
> the
> >> following error:
> >> AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'
> >> ProfileIndex is my index, I didn't created a full_prepare atribute, but
> I
> >> wonder that haystack created that for me, right?
>
> full_prepare is a method in the SearchIndex class in Haystack. Does
> ProfileIndex inherit from SearchIndex?
>
> Maybe haystack isn't installed properly and Python can't find the
> SearchIndex class? Although that should be a different error I
> believe.
>
> >> Anyone has any idea where can be the error? and how can I fix it?
> >>
> >> my Django version: 1.2.3
> >> Best Regardds,
> >> Daniel França
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Dec. 21, 2010 17:34:22

Daniel F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Haystack error rebuinding index


here's the stackstrace

Traceback (most recent call last):
File "manage.py", line 28, in <module>
execute_from_command_line()
File
"/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line
352, in execute_from_command_line
utility.execute()
File
"/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line
306, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
line 192, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
line 219, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
line 348, in handle
return self.handle_noargs(**options)
File
"/usr/local/lib/python2.6/dist-packages/haystack/management/commands/rebuild_index.py",
line 11, in handle_noargs
call_command('update_index')
File
"/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line
169, in call_command
return klass.execute(*args, **defaults)
File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
line 219, in execute
output = self.handle(*args, **options)
File
"/usr/local/lib/python2.6/dist-packages/haystack/management/commands/update_index.py",
line 51, in handle
self.handle_app(None, **options)
File
"/usr/local/lib/python2.6/dist-packages/haystack/management/commands/update_index.py",
line 107, in handle_app
index.backend.update(index, small_cache_qs)
File "build/bdist.linux-x86_64/egg/xapian_backend.py", line 207, in update
AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'


2010/12/21 Daniel França <daniel.fra...@gmail.com>

> Hi, here's my search index:
>
> import datetime
> from haystack import indexes
> from haystack import site
> from profiles.models import Profile
>
> class ProfileIndex(indexes.SearchIndex):
> text = indexes.CharField(use_template=True, document=True)
> first_name = indexes.CharField(model_attr='first_name')
> last_name = indexes.CharField(model_attr='last_name')
> about = indexes.CharField(model_attr='about')
> interests = indexes.CharField(model_attr='interests')
>
> def get_queryset(self):
> return Profile.objects.all()
>
> site.register(Profile, ProfileIndex)
>
> I don't know if it helps, but here's my profile_text.txt
>
> {{ object.user.username }}
> {{ object.first_name }}
> {{ object.last_name }}
>
> and my Profile model
>
> class Profile(models.Model):
>
> user = models.ForeignKey(User, unique=True, verbose_name=_('user'))
> first_name = models.CharField(_('first_name'), max_length=30,
> null=False, default='')
> last_name = models.CharField(_('last_name'), max_length=70, null=False,
> default='')
> age = models.IntegerField(_('age'), null=True)
> about = models.TextField(_('about'), null=True, blank=True)
> interests = models.TextField(_('interests'), null=True, blank=True)
> birth_date = models.DateField(_('birth_date'), null=False,
> default='1900-01-01')
> location = models.CharField(_('location'), max_length=40, null=True,
> blank=True)
> state = models.CharField(_('state'), choices=STATE_CHOICE,
> max_length=40, null=True, blank=True)
> country = models.CharField(_('country'), max_length=40, null=True,
> blank=True)
> website = models.URLField(_('website'), null=True, blank=True)
> account_type = models.ForeignKey(AccountType, verbose_name=('account
> type'), null=True)
>
>
> and it was working at Mac, so I believe it's a misconfiguration or
> misinstallation
>
> On Tue, Dec 21, 2010 at 3:00 AM, Sam Lai <samuel....@gmail.com> wrote:
>
>> 2010/12/21 Daniel França <daniel.fra...@gmail.com>:
>> > anyone?
>> >
>> > 2010/12/19 Daniel França <daniel.fra...@gmail.com>
>> >>
>> >> Hi all
>> >> I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu
>> >> 10.10) using python 2.6.6, but now when I try to rebuild the index I
>> get the
>> >> following error:
>> >> AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'
>> >> ProfileIndex is my index, I didn't created a full_prepare atribute, but
>> I
>> >> wonder that haystack created that for me, right?
>>
>> full_prepare is a method in the SearchIndex class in Haystack. Does
>> ProfileIndex inherit from SearchIndex?
>>
>> Maybe haystack isn't installed properly and Python can't find the
>> SearchIndex class? Although that should be a different error I
>> believe.
>>
>> >> Anyone has any idea where can be the error? and how can I fix it?
>> >>
>> >> my Django version: 1.2.3
>> >> Best Regardds,
>> >> Daniel França
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> > For more options, visit this group at
>> >http://groups.google.com/group/django-users?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 Dec. 21, 2010 23:14:10

Daniel F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Haystack error rebuinding index


Hi,
the problem was some incompatibilites between haystack and haystack-xapian

2010/12/21 Daniel França <daniel.fra...@gmail.com>

> here's the stackstrace
>
> Traceback (most recent call last):
> File "manage.py", line 28, in <module>
> execute_from_command_line()
> File
> "/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line
> 352, in execute_from_command_line
> utility.execute()
> File
> "/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line
> 306, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
> line 192, in run_from_argv
> self.execute(*args, **options.__dict__)
> File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
> line 219, in execute
> output = self.handle(*args, **options)
> File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
> line 348, in handle
> return self.handle_noargs(**options)
> File
> "/usr/local/lib/python2.6/dist-packages/haystack/management/commands/rebuild_index.py",
> line 11, in handle_noargs
> call_command('update_index')
> File
> "/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line
> 169, in call_command
> return klass.execute(*args, **defaults)
> File "/usr/lib/python2.6/dist-packages/django/core/management/base.py",
> line 219, in execute
> output = self.handle(*args, **options)
> File
> "/usr/local/lib/python2.6/dist-packages/haystack/management/commands/update_index.py",
> line 51, in handle
> self.handle_app(None, **options)
> File
> "/usr/local/lib/python2.6/dist-packages/haystack/management/commands/update_index.py",
> line 107, in handle_app
> index.backend.update(index, small_cache_qs)
> File "build/bdist.linux-x86_64/egg/xapian_backend.py", line 207, in
> update
> AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'
>
>
> 2010/12/21 Daniel França <daniel.fra...@gmail.com>
>
>> Hi, here's my search index:
>>
>> import datetime
>> from haystack import indexes
>> from haystack import site
>> from profiles.models import Profile
>>
>> class ProfileIndex(indexes.SearchIndex):
>> text = indexes.CharField(use_template=True, document=True)
>> first_name = indexes.CharField(model_attr='first_name')
>> last_name = indexes.CharField(model_attr='last_name')
>> about = indexes.CharField(model_attr='about')
>> interests = indexes.CharField(model_attr='interests')
>>
>> def get_queryset(self):
>> return Profile.objects.all()
>>
>> site.register(Profile, ProfileIndex)
>>
>> I don't know if it helps, but here's my profile_text.txt
>>
>> {{ object.user.username }}
>> {{ object.first_name }}
>> {{ object.last_name }}
>>
>> and my Profile model
>>
>> class Profile(models.Model):
>>
>> user = models.ForeignKey(User, unique=True, verbose_name=_('user'))
>> first_name = models.CharField(_('first_name'), max_length=30,
>> null=False, default='')
>> last_name = models.CharField(_('last_name'), max_length=70,
>> null=False, default='')
>> age = models.IntegerField(_('age'), null=True)
>> about = models.TextField(_('about'), null=True, blank=True)
>> interests = models.TextField(_('interests'), null=True, blank=True)
>> birth_date = models.DateField(_('birth_date'), null=False,
>> default='1900-01-01')
>> location = models.CharField(_('location'), max_length=40, null=True,
>> blank=True)
>> state = models.CharField(_('state'), choices=STATE_CHOICE,
>> max_length=40, null=True, blank=True)
>> country = models.CharField(_('country'), max_length=40, null=True,
>> blank=True)
>> website = models.URLField(_('website'), null=True, blank=True)
>> account_type = models.ForeignKey(AccountType, verbose_name=('account
>> type'), null=True)
>>
>>
>> and it was working at Mac, so I believe it's a misconfiguration or
>> misinstallation
>>
>> On Tue, Dec 21, 2010 at 3:00 AM, Sam Lai <samuel....@gmail.com> wrote:
>>
>>> 2010/12/21 Daniel França <daniel.fra...@gmail.com>:
>>> > anyone?
>>> >
>>> > 2010/12/19 Daniel França <daniel.fra...@gmail.com>
>>> >>
>>> >> Hi all
>>> >> I was using haystack(xapian) at a Mac, so I moved it to a Linux
>>> (Ubuntu
>>> >> 10.10) using python 2.6.6, but now when I try to rebuild the index I
>>> get the
>>> >> following error:
>>> >> AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'
>>> >> ProfileIndex is my index, I didn't created a full_prepare atribute,
>>> but I
>>> >> wonder that haystack created that for me, right?
>>>
>>> full_prepare is a method in the SearchIndex class in Haystack. Does
>>> ProfileIndex inherit from SearchIndex?
>>>
>>> Maybe haystack isn't installed properly and Python can't find the
>>> SearchIndex class? Although that should be a different error I
>>> believe.
>>>
>>> >> Anyone has any idea where can be the error? and how can I fix it?
>>> >>
>>> >> my Django version: 1.2.3
>>> >> Best Regardds,
>>> >> Daniel França
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "Django users" group.
>>> > To post to this group, send email to django-us...@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>>> .
>>> > For more options, visit this group at
>>> >http://groups.google.com/group/django-users?hl=en.
>>> >
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-us...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>>> .
>>> For more options, visit this group at
>>>http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 12th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support