Can't review applications with utf-8 names

Bug #709024 reported by Michael Terry
This bug report is a duplicate of:  Bug #709121: fails to flag review for dejadup. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ratings and Reviews server
New
Undecided
Unassigned
software-center (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: software-center

Trying to game the system and review my own app deja-dup, the UI said it couldn't submit the review, and I got the following traceback on the console:

2011-01-27 23:07:47,896 - root - INFO - _review_ready_callback: Déjà Dup Backup Tool,deja-dup
ERROR:root:submit_review
Traceback (most recent call last):
  File "/usr/share/software-center/submit_review.py", line 245, in _submit_reviews_if_pending
    res = self.rnrclient.submit_review(review=piston_review)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 47, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 16, in wrapper
    response, body = func(*args, **kwargs)
  File "/usr/share/software-center/softwarecenter/backend/rnrclient_pristine.py", line 70, in submit_review
    content_type='application/json')
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 159, in _post
    return self._request(path, method='POST', body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 183, in _request
    response, body))
APIError: 500: {'status': '500', 'via': '1.1 reviews.staging.ubuntu.com', 'transfer-encoding': 'chunked', 'vary': 'Authorization,Accept-Encoding', 'server': 'Apache/2.2.14 (Ubuntu)', 'connection': 'close', 'date': 'Fri, 28 Jan 2011 04:07:59 GMT', 'content-type': 'text/html; charset=utf-8'}
-----
Piston/0.2.2 (Django 1.1.1) crash report:

Traceback (most recent call last):

  File "/usr/lib/python2.6/dist-packages/reviewsapp/api/handlers.py", line 124, in create
    invalidate_paginated_reviews_for(review)

  File "/usr/lib/python2.6/dist-packages/reviewsapp/utilities.py", line 175, in invalidate_paginated_reviews_for
    package_app_name = "{0};{1}".format(package_name, app_name)

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: software-center 3.1.12
ProcVersionSignature: Ubuntu 2.6.37-12.26-generic 2.6.37
Uname: Linux 2.6.37-12-generic x86_64
Architecture: amd64
Date: Thu Jan 27 23:09:00 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_GB.utf8
 LC_MESSAGES=en_US.utf8
 SHELL=/bin/bash
SourcePackage: software-center

Revision history for this message
Michael Terry (mterry) wrote :
Revision history for this message
Aaron Peachey (aaronp) wrote :

I don't believe this is specifically related to UTF8 names. This error came up (and subsequently went away) a few times while I was testing changes to the submit review app and I believe it is more likely to be an issue with the review web server.

Changed in software-center (Ubuntu):
status: New → Confirmed
summary: - Can't review applications with utf-8 names
+ 500 error from review server, review fails to submit
Revision history for this message
Gary Lasker (gary-lasker) wrote : Re: 500 error from review server, review fails to submit

Heya Aaron, hello and thanks for your comment. Actually, in this case this does indeed appear to be an error due to the unicode in this (most righteous) application's title, as evidenced by the following line in the Piston/Django crash report (see summary above):

  UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)

So I will revert the title to indicate that again.

mterry, sorry about that, man!!

I believe that the "500" errors that you (and I as well) were seeing in testing previously have been resolved on the server-side before the general release of the ratings and reviews feature. At least, I am not seeing them anymore. If however you do see that error again and it's not related to the unicode issue, of course please be sure to open a new bug for that.

And thank you very much for all your help!

Revision history for this message
Gary Lasker (gary-lasker) wrote :

(oh, to be clear -- by "sorry about that", I mean of course sorry to mterry that nobody can enter a review for Déjà Dup...at least, not yet!)

summary: - 500 error from review server, review fails to submit
+ Can't review applications with utf-8 names
Revision history for this message
Aaron Peachey (aaronp) wrote :

Thanks Gary. Looks like I Jumped the gun on this one (would have helped if I looked at the trace before commenting!).
My apologies to mterry too, for wrongfully hijacking his bug report.

Revision history for this message
Gary Lasker (gary-lasker) wrote :

Oh, no worries Aaron! It did indeed look exactly like those other errors we were seeing and it was only when I looked close that I noticed the UnicodeEncodeError (plus, I had suspicions because we ran into a similar problem in the not-so-distant past with those funky characters in that there Déjà Dup name). ;)

Revision history for this message
Michael Nelson (michael.nelson) wrote :

mvo has already fixed this on the server - see bug 709121.

Revision history for this message
Michael Vogt (mvo) wrote :

I matk it as a dupe and close the softare-center task (the client does not need a fix, just the server).

Changed in software-center (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.