← Back to team overview

desktop-packages team mailing list archive

[Bug 856429] Re: Flagging review fails (ValidationException: Argument 'reason' must be a string)

 

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

** Changed in: software-center (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to software-center in Ubuntu.
https://bugs.launchpad.net/bugs/856429

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

Status in “software-center” package in Ubuntu:
  In Progress

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
  ------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/856429/+subscriptions