Looks like we're not properly checking whether there's an error and assuming
it's a draft. Certainly a bug. If you can file this backtrace in a bug
report, that would be helpful.

The problem is that the user specified doesn't have permission to modify
that review request. The code that checks that is returning a
WebAPIResponseError, but the code calling the function that received that as
a return value isn't checking to see if it got an error response.

Is the username and password you're using that of the user who submitted the
code, or is it a special user with the special permissions? See
http://review-board.org/docs/manual/dev/users/tools/post-review/#automatingpost-review

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


On Thu, Aug 20, 2009 at 2:46 AM, Rujia Liu <rujia....@gmail.com> wrote:

> Hi!
>
> Oops, I didn't realize that ReviewBoard sent me an email.
>
> Notice that I'm NOT using the nightly built ReviewBoard (I just used
> easy_install ReviewBoard). Is that because attribute "target_groups" has
> been renamed?
>
> - Rujia
>
> ========= Email begins ==========
>
> Title: [Django] Error (EXTERNAL IP): /api/json/reviewrequests/6/draft/set/
>
> Content:
> Traceback (most recent call last):
>
>  File
> "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/core/handlers/base.py",
> line 92, in get_response
>    response = callback(request, *callback_args, **callback_kwargs)
>
>  File
> "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/views/decorators/cache.py",
> line 44, in _wrapped_view_func
>    response = view_func(request, *args, **kwargs)
>
>  File
> "/usr/lib/python2.5/site-packages/Djblets-0.5.1-py2.5.egg/djblets/webapi/decorators.py",
> line 32, in _checklogin
>    response = view_func(request, *args, **kwargs)
>
>  File
> "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/views/decorators/http.py",
> line 37, in inner
>    return func(request, *args, **kwargs)
>
>  File
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.0.1-py2.5.egg/reviewboard/webapi/json.py",
> line 872, in review_request_draft_set
>    request.POST[field_name])
>
>  File
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.0.1-py2.5.egg/reviewboard/webapi/json.py",
> line 762, in _set_draft_field_data
>    target = getattr(draft, field_name)
>
> AttributeError: 'WebAPIResponseError' object has no attribute
> 'target_groups'
>
>
> <ModPythonRequest
> path:/api/json/reviewrequests/6/draft/set/,
> GET:<QueryDict: {}>,
> POST:<QueryDict: {u'target_groups': [u'ggg']}>,
> COOKIES:{'rbsessionid': 'd4239c2df97334b14da98281a13ff72f'},
> META:{'AUTH_TYPE': None,
>  'CONTENT_LENGTH': 0L,
>  'CONTENT_TYPE': None,
>  'GATEWAY_INTERFACE': 'CGI/1.1',
>  'HTTP_ACCEPT_ENCODING': 'identity',
>  'HTTP_CONNECTION': 'close',
>  'HTTP_CONTENT_LENGTH': '149',
>  'HTTP_CONTENT_TYPE': 'multipart/form-data;
> boundary=192.168.1.254.0.4112.1250759306.135.2',
>  'HTTP_COOKIE': 'rbsessionid=d4239c2df97334b14da98281a13ff72f',
>  'HTTP_HOST': 'myrbserver',
>  'HTTP_USER_AGENT': 'post-review/0.8',
>  'PATH_INFO': u'/api/json/reviewrequests/6/draft/set/',
>  'PATH_TRANSLATED': None,
>  'QUERY_STRING': None,
>  'REMOTE_ADDR': '127.0.0.1',
>  'REMOTE_HOST': None,
>  'REMOTE_IDENT': None,
>  'REMOTE_USER': None,
>  'REQUEST_METHOD': 'POST',
>  'SCRIPT_NAME': '',
>  'SERVER_NAME': 'myrbserver',
>  'SERVER_PORT': 80,
>  'SERVER_PROTOCOL': 'HTTP/1.1',
>  'SERVER_SOFTWARE': 'mod_python'}>
>
>
>
> >
>

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

Reply via email to