3681: Disabling email notifications for my own activity causes server 500 error

sarar******@gmai***** (Google Code) (Is this you? Claim this profile.)
Dec. 2, 2014
What version are you running?
2.0.11

What's the URL of the page containing the problem?
http://reviewboard.cctechnol.com/r/4712/

What steps will reproduce the problem?
1. In My Account->Settings, uncheck both get e-mail notification options.
2. Create a new review request, click publish
3.

What is the expected output? What do you see instead?
Expected output: Review request is published with no error
Actual output: HTTP 500 error, but when you go back to the dashboard, the request was published. I also receive an error email from the server.

What operating system are you using? What browser?
Happens both with Windows 7/Firefox and with Fedora 20 Firefox 33.1


Please provide any additional information below.

There are no errors in the developer console. The email and the reviewboard.log include the same traceback.
Contents of error email:

Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/Django-1.6.7-py2.6.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib/python2.6/site-packages/Django-1.6.7-py2.6.egg/django/views/decorators/cache.py", line 52, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Django-1.6.7-py2.6.egg/django/views/decorators/vary.py", line 19, in inner_func
    response = func(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/resources.py", line 496, in __call__
    request, method, view, api_format=api_format, *args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/resources.py", line 567, in call_method_view
    return view(request, *args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/resources.py", line 764, in put
    return self.update(request, *args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/decorators.py", line 117, in _call
    return view_func(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.11-py2.6.egg/reviewboard/webapi/decorators.py", line 110, in _check
    return view_func(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/decorators.py", line 117, in _call
    return view_func(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/decorators.py", line 138, in _checklogin
    return view_func(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/decorators.py", line 117, in _call
    return view_func(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/decorators.py", line 117, in _call
    return view_func(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/Djblets-0.8.12-py2.6.egg/djblets/webapi/decorators.py", line 287, in _validate
    return view_func(*args, **new_kwargs)

  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.11-py2.6.egg/reviewboard/webapi/resources/review_request_draft.py", line 439, in update
    review_request.publish(user=request.user)

  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.11-py2.6.egg/reviewboard/reviews/models/review_request.py", line 792, in publish
    changedesc=changes)

  File "/usr/lib/python2.6/site-packages/Django-1.6.7-py2.6.egg/django/dispatch/dispatcher.py", line 185, in send
    response = receiver(signal=self, sender=sender, **named)

  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.11-py2.6.egg/reviewboard/notifications/email.py", line 46, in review_request_published_cb
    mail_review_request(review_request, changedesc)

  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.11-py2.6.egg/reviewboard/notifications/email.py", line 347, in mail_review_request
    extra_context)

  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.11-py2.6.egg/reviewboard/notifications/email.py", line 227, in send_review_mail
    recipients.remove(from_email)

KeyError: u'"Sara Rayburn" <serayburn@cctechnol.com>'


<WSGIRequest
path:/api/review-requests/4713/draft/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'api_format': [u'json'], u'public': [u'1'], u'expand': [u'depends_on,target_people,target_groups']}>,
COOKIES:{'collapsediffs': 'True',
 'csrftoken': '4R1Dc0K52oj6FX8pCql6zYvsBhwXv3Jf',
 'rbsessionid': '4tydl6k85c8r70armn1z84r2w4tg9qh5'},
META:{'CONTENT_LENGTH': '74',
 'CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8',
 'DOCUMENT_ROOT': '/var/www/reviewboard/htdocs',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_COOKIE': 'csrftoken=4R1Dc0K52oj6FX8pCql6zYvsBhwXv3Jf; rbsessionid=4tydl6k85c8r70armn1z84r2w4tg9qh5; collapsediffs=True',
 'HTTP_HOST': 'reviewboard.cctechnol.com',
 'HTTP_REFERER': 'http://reviewboard.cctechnol.com/r/4713/',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0',
 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
 u'LOCAL_SITE': None,
 'PATH_INFO': u'/api/review-requests/4713/draft/',
 'PATH_TRANSLATED': '/var/www/reviewboard/htdocs/reviewboard.wsgi/api/review-requests/4713/draft/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '10.0.2.139',
 'REMOTE_PORT': '54939',
 'REQUEST_METHOD': 'PUT',
 'REQUEST_URI': '/api/review-requests/4713/draft/',
 'SCRIPT_FILENAME': '/var/www/reviewboard/htdocs/reviewboard.wsgi',
 'SCRIPT_NAME': u'',
 'SERVER_ADDR': '10.0.0.68',
 'SERVER_ADMIN': 'root@localhost',
 'SERVER_NAME': 'reviewboard.cctechnol.com',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.2.15 (CentOS) Server at reviewboard.cctechnol.com Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.15 (CentOS)',
 u'USERNAME': u'serayburn',
 u'USER_EMAIL': u'serayburn@cctechnol.com',
 'mod_ssl.is_https': <built-in method ssl_is_https of mod_wsgi.Adapter object at 0x7f25ae8d7be8>,
 'mod_ssl.var_lookup': <built-in method ssl_var_lookup of mod_wsgi.Adapter object at 0x7f25ae8d7be8>,
 'mod_wsgi.application_group': 'reviewboard.cctechnol.com|',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 2),
 'wsgi.errors': <mod_wsgi.Log object at 0x7f25aea1b9b0>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f25ae8d7be8>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f25ae770070>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 1)}>
david
#1 david
Fixed in release-2.0.x (eea73a5). Thanks!
  • +Fixed