I'm getting an error making qs.  Did I type it wrong?

$ sudo rb-site manage /Library/Server/Web/Data/WebApps/ReviewBoard shell
Python 2.7.5 (default, Mar  9 2014, 22:15:05) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from reviewboard.reviews.models import ReviewRequest
>>> from django.db.models import Q
>>> qs = ReviewRequest.objects.public(status=None, 
extra_status=Q(status='P') | Q(status='S'))
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File 
"/Library/Python/2.7/site-packages/ReviewBoard-2.0.2-py2.7.egg/reviewboard/reviews/managers.py",
 
line 247, in public
    return self._query(filter_private=filter_private, *args, **kwargs)
TypeError: _query() got an unexpected keyword argument 'extra_status'

On Tuesday, July 1, 2014 11:30:55 AM UTC-7, Christian Hammond wrote:
>
> Can you see what happens when you run this:
>
>     $ rb-site manage /path/to/site shell
>     >>> from reviewboard.reviews.models import ReviewRequest
>     >>> from django.db.models import Q
>     >>> qs = ReviewRequest.objects.public(status=None, 
> extra_status=Q(status=‘P’) | Q(status=’S’))
>     >>> qs = qs.select_related(‘submitter’, ‘diffset_history’)
>     >>> qs = qs.prefetch_related(‘diffset_history__diffsets__files’)
>     >>> print qs.count()
>
> This is what it’s running when it’s trying to index the review requests, 
> but it’s claiming it’s finding 0 results. I want to sanity-check this.
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com <javascript:>
> Review Board - http://www.reviewboard.org
> Beanbag, Inc. - http://www.beanbaginc.com
>
> On July 1, 2014 at 11:25:02 AM, Ian (iand...@mac.com <javascript:>) wrote:
>
> Anyone have any ideas?  =\
>
> On Thursday, June 26, 2014 4:25:29 PM UTC-7, Ian wrote: 
>>
>>  $ sudo -u _www rb-site manage 
>> /Library/Server/Web/Data/WebApps/ReviewBoard rebuild_index -- -v 3
>> WARNING: This will irreparably remove EVERYTHING from your search index 
>> in connection 'default'.
>> Your choices after this are to restore from backups or rebuild via the 
>> `rebuild_index` command.
>> Are you sure you wish to continue? [y/N] y
>> Removing all documents from your index because you said so.
>> All documents removed.
>> Skipping '<class 'django.contrib.admin.models.LogEntry'>' - no index.
>> Skipping '<class 'django.contrib.auth.models.Permission'>' - no index.
>> Skipping '<class 'django.contrib.auth.models.Group'>' - no index.
>> Skipping '<class 'django.contrib.auth.models.User'>' - no index.
>> Skipping '<class 'django.contrib.contenttypes.models.ContentType'>' - no 
>> index.
>> Skipping '<class 'django.contrib.sites.models.Site'>' - no index.
>> Skipping '<class 'django.contrib.sessions.models.Session'>' - no index.
>> Skipping '<class 'djblets.extensions.models.RegisteredExtension'>' - no 
>> index.
>> Skipping '<class 'djblets.siteconfig.models.SiteConfiguration'>' - no 
>> index.
>> Skipping '<class 'reviewboard.accounts.models.ReviewRequestVisit'>' - no 
>> index.
>> Skipping '<class 'reviewboard.accounts.models.Profile'>' - no index.
>> Skipping '<class 'reviewboard.accounts.models.LocalSiteProfile'>' - no 
>> index.
>> Skipping '<class 'django.contrib.admin.models.LogEntry'>' - no index.
>> Skipping '<class 'reviewboard.attachments.models.FileAttachment'>' - no 
>> index.
>> Skipping '<class 'reviewboard.changedescs.models.ChangeDescription'>' - 
>> no index.
>> Skipping '<class 'reviewboard.diffviewer.models.FileDiffData'>' - no 
>> index.
>> Skipping '<class 'reviewboard.diffviewer.models.FileDiff'>' - no index.
>> Skipping '<class 'reviewboard.diffviewer.models.DiffSet'>' - no index.
>> Skipping '<class 'reviewboard.diffviewer.models.DiffSetHistory'>' - no 
>> index.
>> Skipping '<class 'djblets.extensions.models.RegisteredExtension'>' - no 
>> index.
>> Skipping '<class 'reviewboard.hostingsvcs.models.HostingServiceAccount'>' 
>> - no index.
>> Skipping '<class 'reviewboard.reviews.models.group.Group'>' - no index.
>> Skipping '<class 
>> 'reviewboard.reviews.models.default_reviewer.DefaultReviewer'>' - no index.
>> Skipping '<class 'reviewboard.reviews.models.diff_comment.Comment'>' - no 
>> index.
>> Skipping '<class 
>> 'reviewboard.reviews.models.file_attachment_comment.FileAttachmentComment'>' 
>> - no index.
>> Skipping '<class 'reviewboard.reviews.models.screenshot.Screenshot'>' - 
>> no index.
>> Indexing 0 review requests
>> Skipping '<class 
>> 'reviewboard.reviews.models.screenshot_comment.ScreenshotComment'>' - no 
>> index.
>> Skipping '<class 'reviewboard.reviews.models.review.Review'>' - no index.
>> Skipping '<class 
>> 'reviewboard.reviews.models.review_request_draft.ReviewRequestDraft'>' - no 
>> index.
>> Skipping '<class 'reviewboard.scmtools.models.Tool'>' - no index.
>> Skipping '<class 'reviewboard.scmtools.models.Repository'>' - no index.
>> Skipping '<class 'reviewboard.site.models.LocalSite'>' - no index.
>> Skipping '<class 'django_evolution.models.Version'>' - no index.
>> Skipping '<class 'django_evolution.models.Evolution'>' - no index.
>>
>> On Thursday, June 26, 2014 4:09:50 PM UTC-7, Christian Hammond wrote: 
>>>
>>>  What does rebuild_index with -v 3 show?
>>>  
>>>  Christian
>>>  
>>>   -- 
>>>  Christian Hammond - chri...@beanbaginc.com
>>>  Review Board - http://www.reviewboard.org 
>>> Beanbag, Inc. - http://www.beanbaginc.com
>>>  
>>> On June 26, 2014 at 2:32:22 PM, Ian (iand...@mac.com) wrote:
>>>
>>>   Looks like I have django_haystack-2.1.0-py2.7.egg 
>>> and Whoosh-2.6.0-py2.7.egg installed.
>>>  
>>> Everything appears to be writable by the web server (_www). 
>>>
>>>  $ ls -l /Library/Server/Web/Data/WebApps/ReviewBoard
>>> total 0
>>> drwxr-xr-x  2 root  admin  204 Dec  5  2013 conf
>>> drwxr-xr-x  4 _www  admin  136 Jun 26 02:06 data
>>> drwxr-xr-x  4 root  admin  204 Jun 19 13:00 htdocs
>>> drwxr-xr-x  2 root  admin   68 Dec  5  2013 logs
>>> drwxrwxrwx  3 root  admin  102 Dec  5  2013 tmp
>>>
>>> $ ls -l /Library/Server/Web/Data/WebApps/ReviewBoard/data
>>> total 0
>>> drwxr-xr-x  2 _www  admin  102 Jun 26 02:06 search-index
>>>
>>> $ ls -l /Library/Server/Web/Data/WebApps/ReviewBoard/data/search-index/
>>> total 8
>>> -rw-r--r--  1 _www  admin  3558 Jun 26 02:06 _MAIN_0.toc
>>>
>>> This is what -v 3 said.
>>>
>>>  $ sudo -u _www rb-site manage 
>>> /Library/Server/Web/Data/WebApps/ReviewBoard update_index -- -v 3
>>> Skipping '<class 'django.contrib.admin.models.LogEntry'>' - no index.
>>> Skipping '<class 'django.contrib.auth.models.Permission'>' - no index.
>>> Skipping '<class 'django.contrib.auth.models.Group'>' - no index.
>>> Skipping '<class 'django.contrib.auth.models.User'>' - no index.
>>> Skipping '<class 'django.contrib.contenttypes.models.ContentType'>' - no 
>>> index.
>>> Skipping '<class 'django.contrib.sites.models.Site'>' - no index.
>>> Skipping '<class 'django.contrib.sessions.models.Session'>' - no index.
>>> Skipping '<class 'djblets.extensions.models.RegisteredExtension'>' - no 
>>> index.
>>> Skipping '<class 'djblets.siteconfig.models.SiteConfiguration'>' - no 
>>> index.
>>> Skipping '<class 'reviewboard.accounts.models.ReviewRequestVisit'>' - no 
>>> index.
>>> Skipping '<class 'reviewboard.accounts.models.Profile'>' - no index.
>>> Skipping '<class 'reviewboard.accounts.models.LocalSiteProfile'>' - no 
>>> index.
>>> Skipping '<class 'django.contrib.admin.models.LogEntry'>' - no index.
>>> Skipping '<class 'reviewboard.attachments.models.FileAttachment'>' - no 
>>> index.
>>> Skipping '<class 'reviewboard.changedescs.models.ChangeDescription'>' - 
>>> no index.
>>> Skipping '<class 'reviewboard.diffviewer.models.FileDiffData'>' - no 
>>> index.
>>> Skipping '<class 'reviewboard.diffviewer.models.FileDiff'>' - no index.
>>> Skipping '<class 'reviewboard.diffviewer.models.DiffSet'>' - no index.
>>> Skipping '<class 'reviewboard.diffviewer.models.DiffSetHistory'>' - no 
>>> index.
>>> Skipping '<class 'djblets.extensions.models.RegisteredExtension'>' - no 
>>> index.
>>> Skipping '<class 
>>> 'reviewboard.hostingsvcs.models.HostingServiceAccount'>' - no index.
>>> Skipping '<class 'reviewboard.reviews.models.group.Group'>' - no index.
>>> Skipping '<class 
>>> 'reviewboard.reviews.models.default_reviewer.DefaultReviewer'>' - no index.
>>> Skipping '<class 'reviewboard.reviews.models.diff_comment.Comment'>' - 
>>> no index.
>>> Skipping '<class 
>>> 'reviewboard.reviews.models.file_attachment_comment.FileAttachmentComment'>'
>>>  
>>> - no index.
>>> Skipping '<class 'reviewboard.reviews.models.screenshot.Screenshot'>' - 
>>> no index.
>>> Indexing 0 review requests
>>> Skipping '<class 
>>> 'reviewboard.reviews.models.screenshot_comment.ScreenshotComment'>' - no 
>>> index.
>>> Skipping '<class 'reviewboard.reviews.models.review.Review'>' - no index.
>>> Skipping '<class 
>>> 'reviewboard.reviews.models.review_request_draft.ReviewRequestDraft'>' - no 
>>> index.
>>> Skipping '<class 'reviewboard.scmtools.models.Tool'>' - no index.
>>> Skipping '<class 'reviewboard.scmtools.models.Repository'>' - no index.
>>> Skipping '<class 'reviewboard.site.models.LocalSite'>' - no index.
>>> Skipping '<class 'django_evolution.models.Version'>' - no index.
>>> Skipping '<class 'django_evolution.models.Evolution'>' - no index.
>>>
>>> Ian
>>>
>>> On Thursday, June 26, 2014 11:57:57 AM UTC-7, Christian Hammond wrote: 
>>>>
>>>>  Hi Ian,
>>>>  
>>>>  Just to check, is that directory and everything in it writeable by 
>>>> the web server?
>>>>  
>>>>  Try running update_index with -v 3. You should hopefully get more 
>>>> useful info out of it.
>>>>  
>>>>  Also, which versions of Haystack and Whoosh?
>>>>  
>>>>  Christian
>>>>  
>>>>   -- 
>>>>  Christian Hammond - chri...@beanbaginc.com
>>>>  Review Board - http://www.reviewboard.org 
>>>> Beanbag, Inc. - http://www.beanbaginc.com
>>>>  
>>>> On June 26, 2014 at 2:11:36 AM, Ian (iand...@mac.com) wrote:
>>>>
>>>>  I'm trying to use Search with ReviewBoard 2.0.2.  I simply checked 
>>>> "Enable search" and left the "Search index directory" empty (which the 
>>>> docs 
>>>> say lets it use the default).  Then I did rb-site manage /path/to/my/site 
>>>> rebuild_index which warned me and then said this. 
>>>> Removing all documents from your index because you said so.
>>>> All documents removed.
>>>> Indexing 0 review requests
>>>>  
>>>> update_index similarly said that it was indexing nothing.  The data 
>>>> directory in my site directory does now have a search-index directory, in 
>>>> which is a _MAIN_0.toc file, but as far as I can tell search isn't working 
>>>> at all.  Any idea how I can fix this?
>>>>  --
>>>> Get the Review Board Power Pack at 
>>>> http://www.reviewboard.org/powerpack/
>>>> ---
>>>> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
>>>> ---
>>>> Happy user? Let us know at http://www.reviewboard.org/users/
>>>> ---
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "reviewboard" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to reviewboard...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>  
>>>>    --
>>> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
>>> ---
>>> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
>>> ---
>>> Happy user? Let us know at http://www.reviewboard.org/users/
>>> ---
>>> You received this message because you are subscribed to the Google 
>>> Groups "reviewboard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to reviewboard...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>  
>>>    --
> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
> ---
> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
> ---
> Happy user? Let us know at http://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups 
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to reviewboard...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to