This is actually already fixed for 2.0.20, unless I missed something big.
Planning a release in the next few days.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Wed, Sep 9, 2015 at 11:58 AM, David Trowbridge <trowb...@gmail.com>
wrote:

> Looks like a fine fix. Can you post this on reviews.reviewboard.org?
>
> Thanks!
> -David
>
> On Wed, Sep 9, 2015 at 10:33 AM Alexey Neyman <alexey.ney...@gmail.com>
> wrote:
>
>> FWIW, converting an iterator to list explicitly seems to help. Changed
>> this line:
>>
>>     return json.dumps(review_ui.serialize_comments(
>>         file_attachment.get_comments()))
>>
>> to this
>>
>>     return json.dumps(list(review_ui.serialize_comments(
>>         file_attachment.get_comments())))
>>
>> no crash observed. Don't know if it is the right fix, though.
>>
>> Regards,
>> Alexey.
>>
>>
>> On Friday, September 4, 2015 at 10:23:45 AM UTC-7, Alexey Neyman wrote:
>>>
>>> Hi all,
>>>
>>> We have a "Something broke (Error 500)" while trying to access one of
>>> the review requests. I am pretty sure it was displayed fine previously at
>>> some point, but at some point stopped working. I suspect the 2.0.19 update
>>> is the culprit, as this last call in the stack trace
>>> (file_attachment_comments) has changed substantially from 2.0.18.
>>>
>>> The stack trace is:
>>>
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-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/ReviewBoard-2.0.19-py2.6.egg/reviewboard/accounts/decorators.py",
>>>  line 21, in _check
>>>     return login_required(view_func)(*args, **kwargs)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/contrib/auth/decorators.py",
>>>  line 22, in _wrapped_view
>>>     return view_func(request, *args, **kwargs)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.19-py2.6.egg/reviewboard/site/decorators.py",
>>>  line 35, in _check
>>>     return view_func(request, local_site=local_site, *args, **kwargs)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.19-py2.6.egg/reviewboard/reviews/views.py",
>>>  line 721, in review_detail
>>>     RequestContext(request, context_data))
>>>   File 
>>> "*/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/shortcuts/*__init__.py",
>>>  line 29, in render_to_response
>>>     return HttpResponse(loader.render_to_string(*args, **kwargs), 
>>> **httpresponse_kwargs)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/loader.py",
>>>  line 164, in render_to_string
>>>     return t.render(Context(dictionary))
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 140, in render
>>>     return self._render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 134, in _render
>>>     return self.nodelist.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 840, in render
>>>     bit = self.render_node(node, context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 854, in render_node
>>>     return node.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/loader_tags.py",
>>>  line 123, in render
>>>     return compiled_parent._render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 134, in _render
>>>     return self.nodelist.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 840, in render
>>>     bit = self.render_node(node, context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 854, in render_node
>>>     return node.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/loader_tags.py",
>>>  line 123, in render
>>>     return compiled_parent._render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 134, in _render
>>>     return self.nodelist.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 840, in render
>>>     bit = self.render_node(node, context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 854, in render_node
>>>     return node.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/loader_tags.py",
>>>  line 62, in render
>>>     result = block.nodelist.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 840, in render
>>>     bit = self.render_node(node, context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 854, in render_node
>>>     return node.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/loader_tags.py",
>>>  line 155, in render
>>>     return self.render_template(self.template, context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/loader_tags.py",
>>>  line 137, in render_template
>>>     output = template.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 140, in render
>>>     return self._render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 134, in _render
>>>     return self.nodelist.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 840, in render
>>>     bit = self.render_node(node, context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 854, in render_node
>>>     return node.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/defaulttags.py",
>>>  line 305, in render
>>>     return nodelist.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 840, in render
>>>     bit = self.render_node(node, context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/base.py",
>>>  line 854, in render_node
>>>     return node.render(context)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/template/defaulttags.py",
>>>  line 203, in render
>>>     nodelist.append(node.render(context))
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Djblets-0.8.21-py2.6.egg/djblets/util/decorators.py",
>>>  line 122, in render
>>>     return self.tag_func(context, *args)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.19-py2.6.egg/reviewboard/reviews/templatetags/reviewtags.py",
>>>  line 91, in file_attachment_comments
>>>     file_attachment.get_comments()))
>>>   File "*/usr/lib64/python2.6/json/*__init__.py", line 230, in dumps
>>>     return _default_encoder.encode(obj)
>>>   File "/usr/lib64/python2.6/json/encoder.py", line 367, in encode
>>>     chunks = list(self.iterencode(o))
>>>   File "/usr/lib64/python2.6/json/encoder.py", line 317, in _iterencode
>>>     for chunk in self._iterencode_default(o, markers):
>>>   File "/usr/lib64/python2.6/json/encoder.py", line 323, in 
>>> _iterencode_default
>>>     newobj = self.default(o)
>>>   File "/usr/lib64/python2.6/json/encoder.py", line 344, in default
>>>     raise TypeError(repr(o) + " is not JSON serializable")
>>>
>>> TypeError: <generator object serialize_comments at 0x7fb4869584b0> is not 
>>> JSON serializable
>>>
>>> Regards,
>>> Alexey.
>>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://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.
>>
> --
> -David
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://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.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://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