404 errors when downloading ratings from PPA?

Bug #709408 reported by Michael Terry on 2011-01-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Aaron Peachey
Aaron Peachey

Bug Description

Binary package hint: software-center

The terminal from which I launched software-center has a bunch of these errors:

2011-01-28 13:36:54,990 - root - ERROR - get_reviews
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/reviews.py", line 248, in _get_reviews_threaded
    reviews = self.rnrclient.get_reviews(**kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 32, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 32, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 32, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 32, in wrapper
    return func(*args, **kwargs)
  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/validators.py", line 47, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 52, in wrapper
    body = func(self, *args, **kwargs)
  File "/usr/share/software-center/softwarecenter/backend/rnrclient_pristine.py", line 63, in get_reviews
    distroseries, packagename, appname, page))
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 150, in _get
    return self._request(path, method='GET', scheme=scheme)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 205, in _request
    body = handler.handle(response, body)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/failhandlers.py", line 54, in handle
    raise APIError('%s: %s' % (response['status'], response), body)
APIError: 404: {'status': '404', 'content-length': '3342', 'via': '1.1 reviews.staging.ubuntu.com', 'vary': 'Accept-Encoding', 'server': 'Apache/2.2.14 (Ubuntu)', '-content-encoding': 'gzip', 'date': 'Fri, 28 Jan 2011 18:36:54 GMT', 'content-type': 'text/html'}

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: software-center 3.1.13
ProcVersionSignature: Ubuntu 2.6.37-12.26-generic 2.6.37
Uname: Linux 2.6.37-12-generic x86_64
Architecture: amd64
Date: Fri Jan 28 13:37:30 2011
PackageArchitecture: all
 PATH=(custom, user)
SourcePackage: software-center

Michael Terry (mterry) wrote :
Michael Vogt (mvo) on 2011-02-01
Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Michael Vogt (mvo) on 2011-02-01
tags: added: bitesize
Michael Terry (mterry) wrote :

Oh, I get this error when trying to get reviews for Deja Dup:

2011-02-01 09:24:40,571 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/share/software-center/softwarecenter/view/appdetailsview_gtk.py', 1384, '_reviews_ready_callback')'
2011-02-01 09:24:40,570 - root - INFO - _review_ready_callback: Déjà Dup Backup Tool,deja-dup

Could this be another encoding issue?

(I don't see any reviews for Deja Dup in software-center, when I know I at least submitted one.)

Michael Terry (mterry) wrote :

OK, it's not an encoding thing, it's a PPA thing. When I had the deja-dup PPA enabled, I got this error. Was it trying to get reviews from the PPA?

summary: - 404 errors when downloading ratings?
+ 404 errors when downloading ratings from PPA?
tags: removed: running-unity
Aaron Peachey (aaronp) wrote :

Yes, I have done some tests and it is trying to look for reviews based on the PPA. I'm working on a fix for this.

Changed in software-center (Ubuntu Natty):
status: Confirmed → In Progress
assignee: nobody → Aaron Peachey (aaronp)
Aaron Peachey (aaronp) wrote :

Fix in branch attached.
Note, the fix only stops an exception from being output on a 404 error being found and handles it by simply logging a warning instead. The actual behaviour of Software Center for this scenario is unchanged, as there was nothing wrong with what it was doing before (i.e. it was already adequately handling the fact that it couldn't retrieve reviews in the UI).

We need to determine if we will allow reviews to be submitted for any origin other than 'ubuntu'. If not, I can revise this fix further to not even bother trying to retrieve them if the origin is not ubuntu. I can't imagine why we would want to accept reviews for apps in a PPA, because we could reasonably assume once a user has added a PPA they are doing so because they know what they want to install. If this is the case, are there any other origins for which we would need to accept (and subsequently retrieve) reviews?

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 3.1.20

software-center (3.1.20) natty; urgency=low

  [ Kiwinote ]
  * data/ui/SoftwareCenter.ui,
    - place the status label inside an eventbox to allow focus and setup a11y
      (LP: #575691)
  * softwarecenter/view/appdetailsview_gtk.py:
    - make description accessible
    - correctly update screenshot a11y text and make it less verbose
  * softwarecenter/view/catview_gtk.py:
    - rewrite recommended widget to make it suitable for i18n and a11y
  * softwarecenter/view/widgets/carousel.py:
    - don't transition when a Page has focus
  * softwarecenter/view/widgets/mkit.py:
    - some fixes to correctly update color/cursor of Button upon mouse actions

  [ Aaron Peachey ]
  * softwarecenter/db/reviews.py:
    - prevent 404 errors from outputting a traceback (especially
      caused when origin is a PPA) LP: #709408

  [ Michael Vogt ]
  * softwarecenter/backend/weblive.py:
    - add prototype backend for interacting with weblive, many
      thanks to Stephane Graber
  * merged lp:~osomon/software-center/fixDatabaseLockError, many
    thanks (LP: #625189)

  [ Gary Lasker ]
  * implement "Deauthorize my Computer"
 -- Michael Vogt <email address hidden> Thu, 24 Feb 2011 08:47:40 +0100

Changed in software-center (Ubuntu Natty):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers