Flagging review fails (ValidationException: Argument 'reason' must be a string)

Bug #856429 reported by Matthew Paul Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
High
Unassigned

Bug Description

software-center trunk r2415, Ubuntu 11.10 beta

1. Click the "Inappropriate?" link below a review.
2. Choose a reason, enter some text, and click "Report".

What happens:
* A "Failed to submit" error.
* In ~/.cache/software-center/reviews-helper.log, a traceback:
------------
flag_review failed
Traceback (most recent call last):
  File "./data/report_review_gtk3.py", line 303, in _submit_reports_if_pending
    text=text)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 61, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 33, in wrapper
    "Argument '%s' must be a string" % varname)
ValidationException: Argument 'reason' must be a string
Argument 'reason' must be a string
------------

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

The following test program shows the failure:

#!/usr/bin/python

from gi.repository import Gtk
from gettext import gettext as _

def on_button_clicked(button, combo):
    print combo
    print combo.get_active_text()

if __name__ == "__main__":

    win = Gtk.Window()
    win.set_size_request(500,200)
    box = Gtk.VBox()
    win.add(box)

    combo = Gtk.ComboBoxText()
    for term in [ _(u"Please make a selection\u2026"),
                  _("Offensive language"),
                  _("Other") ]:
        combo.append_text(term)
    combo.set_active(0)

    button = Gtk.Button("get_active_text")
    button.connect("clicked", on_button_clicked, combo)
    box.pack_start(combo, False, False, 0)
    box.pack_start(button, False, False, 0)
    win.connect("destroy", lambda w: Gtk.main_quit())
    win.show_all()

    Gtk.main()

*BUT*
if Gtk.ComboBoxText.new() is used instead its fine.

Changed in software-center (Ubuntu):
status: New → In Progress
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.2 KiB)

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

---------------
software-center (4.1.23.5) oneiric; urgency=low

  [ Robert Roth ]
  * Fix inconsistent colors in banner (LP: #855417)
  * softwarecenter/db/debfile.py,
    softwarecenter/ui/gtk3/views/appdetailsview_gtk.py:
    - display total size in the details view for standalone
      deb files (LP: #851222)
  * softwarecenter/db/database.py:
    - restore support for custom list searches
      (LP: #835069, LP: #828281)

  [ Kiwinote ]
  * correctly index desktop files which refer to packages for which we must
    install a version for a foreign architecture (eg skype)
  * softwarecenter/backend/reviews.py:
    - allow us to write reviews for apps with unicode appname (LP: #856052)

  [ Matthew McGowan ]
  * lp:~mmcg069/software-center/tweaks:
    - mak the avg-rating label white when a row is selected
    - TextBlock.set_visible_window to False. add a css comment
  * lp:~mmcg069/software-center/bug635994-again:
    - make the up/down -arrow behaviour available to both
      detailsview_gtk and the catview_gtk (LP: #635994)
  * lp:~mmcg069/software-center/re-fixes:
    - additional fixes for the detailsview

  [ Gary Lasker ]
  * softwarecenter/ui/gtk3/panes/availablepane.py,
    softwarecenter/ui/gtk3/panes/softwarepane.py:
    - prevent potential crash at startup if views have not yet
      been created on a call to refresh_apps (LP: #855622)
  * softwarecenter/ui/gtk3/panes/availablepane.py,
    softwarecenter/ui/gtk3/panes/installedpane.py:
    - consolidate spinner code, add timeout mask for installed
      view spinner
  * softwarecenter/ui/gtk3/panes/softwarepane.py:
    - display spinner while changing list view sort method
  * softwarecenter/ui/gtk3/app.py:
    - display spinner while loading previous purchases list
  * softwarecenter/ui/gtk3/widgets/actionbar.py:
    - fix regression in action bar button alignment (LP: #856872)
  * softwarecenter/ui/gtk3/panes/availablepane.py:
    - restore action bar functionality for custom lists
      (LP: #835069)
    - don't hide technical items during a custom list search
    - restore custom list search using apt url syntax (LP: #828281)
  * softwarecenter/ui/gtk3/dialogs/__init__.py:
    - fix crash when showing error dialog (LP: #842678)

  [ Didier Roche ]
  * lp:~didrocks/software-center/new-oneconf-sync-signal:
    - enable getting a last sync accurate date as soon as the sync
      is done (LP: #855345)

  [ Michael Vogt ]
  * utils/submit_review_gtk3.py:
    - setup logging from the helper to xdg
      ~/.cache/software-center/reviews-helper.log
  * utils/submit_review_gtk3.py, softwarecenter/ui/gtk3/views/appview.py:
    - use Gtk.ComboBoxText.new() instead of Gtk.ComboBoxText(). This makes
      get_active_text() actually work on the combobox (LP: #856429)
  * softwarecenter/utils.py:
    - fix writing new config before using it (LP: #827527)
  * softwarecenter/backend/reviews.py:
    - write out the review stats in a C friendly bsddb so that unity
      can use it too (thanks to Mikkel Kamstrup)
  * softwarecenter/ui/gtk3/panes/availablepane.py:
    - fix endless recursion (LP: #851671)
 -- Michael Vogt <michael.v...

Read more...

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
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.