Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1335 by Arikon: Error viewing review request with attached  
screenshot with non-latin symbols in its name
http://code.google.com/p/reviewboard/issues/detail?id=1335

Can't reproduce on demo.review-board.org, because it doesn't allow to  
attach screenshots.

What version are you running?
1.0.3

What's the URL of the page containing the problem?
/r/<id>

What steps will reproduce the problem?
1. Attach screenshot with, e.g. russian name to review request
2. Point your browser to page with this review request

What is the expected output? What do you see instead?
Expected output was normal review request page.
I saw 500 page instead.

What operating system are you using? What browser?
Ubuntu Hardy on Server, Max OS X 10.6 on Client, Safari 4.0.3

Exception text:
UnicodeEncodeError   posixpath:171 ascii, /var/lib/yandex/tools-
rb/arc/media/uploaded/images/2009/09/29/Снимок_экрана_2009-09-
29_в_16.50.09_400x100.png, 62, 68, ordinal not in range(128)

Sep 30 09:21:12 rb TOOLS-RB-ARC-TRACEBACK: 2009-09-30 09:21:12,365 traceback
        ERROR
       Path: /arc/r/295/ GET: <QueryDict: {}> POST: <QueryDict: {}>  
Traceback (most recent call
last):
     File "/var/lib/python-support/python2.5/django/core/handlers/base.py",  
line 92, in
get_response     response = callback(request, *callback_args,  
**callback_kwargs)
      
File "/var/lib/python-support/python2.5/reviewboard/accounts/decorators.py",  
line 27, in
_check
      return view_func(*args, **kwargs)
     File "/var/lib/python-support/python2.5/reviewboard/reviews/views.py",  
line 237, in
review_detail
      'PRE_CREATION': PRE_CREATION,
     File "/var/lib/python-support/python2.5/django/shortcuts/__init__.py",  
line 20, in
render_to_response
      return HttpResponse(loader.render_to_string(*args, **kwargs),  
**httpresponse_kwargs)
     File "/var/lib/python-support/python2.5/django/template/loader.py",  
line 108, in
render_to_string
      return t.render(context_instance)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 178, in render
return self.nodelist.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 779, in render
bits.append(self.render_node(node, context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 792, in
render_node
      return node.render(context)
      
File "/var/lib/python-support/python2.5/django/template/loader_tags.py",  
line 97, in render
return compiled_parent.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 178, in render
return self.nodelist.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 779, in render
bits.append(self.render_node(node, context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 792, in
render_node
      return node.render(context)
      
File "/var/lib/python-support/python2.5/django/template/loader_tags.py",  
line 97, in render
return compiled_parent.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 178, in render
return self.nodelist.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 779, in render
bits.append(self.render_node(node, context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 792, in
render_node
      return node.render(context)
      
File "/var/lib/python-support/python2.5/django/template/loader_tags.py",  
line 24, in render
result = self.nodelist.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 779, in render
bits.append(self.render_node(node, context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 792, in
render_node
      return node.render(context)
     File "/var/lib/python-support/python2.5/djblets/util/decorators.py",  
line 150, in render
return self.tag_func(context, self.nodelist, *args)
      
File 
"/var/lib/python-support/python2.5/djblets/util/templatetags/djblets_deco.py",  
line 44,
in box
      'content': nodelist.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 779, in render
bits.append(self.render_node(node, context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 792, in
render_node     return node.render(context)
      
File "/var/lib/python-support/python2.5/django/template/loader_tags.py",  
line 111, in
render     return self.template.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 178, in render
return self.nodelist.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 779, in render
bits.append(self.render_node(node, context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 792, in
render_node     return node.render(context)
      
File "/var/lib/python-support/python2.5/django/template/defaulttags.py",  
line 243, in render
return self.nodelist_true.render(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 779, in render
bits.append(self.render_node(node, context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 792, in
render_node     return node.render(context)
      
File "/var/lib/python-support/python2.5/django/template/defaulttags.py",  
line 155, in render
nodelist.append(node.render(context))
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 826, in render
output = self.filter_expression.resolve(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 546, in resolve
obj = self.var.resolve(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 687, in resolve
value = self._resolve_lookup(context)
     File "/var/lib/python-support/python2.5/django/template/__init__.py",  
line 722, in
_resolve_lookup
      current = current()
     File "/var/lib/python-support/python2.5/reviewboard/reviews/models.py",  
line 140, in thumb
url = thumbnail(self.image)
      
File 
"/var/lib/python-support/python2.5/djblets/util/templatetags/djblets_images.py",
  
line
90, in thumbnail
      if not os.path.exists(miniature_filename):
     File "/usr/lib/python2.5/posixpath.py", line 171, in exists
      st = os.stat(path)
   UnicodeEncodeError: 'ascii' codec can't encode characters in position  
62-67: ordinal not in
range(128)

PS: I attached example screenshot with russian name to this ticket to  
reproduce

Attachments:
        Снимок экрана 2009-09-29 в 16.50.09.png  19.1 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to