Ticket #377 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Umit Crash - 'GtkAboutDialog.set_copyright() argument 1 must be string or None, not list'

Reported by: jdk2588@… Owned by: boltrix
Priority: medium Milestone: Umit 1.0
Component: CrashReport Version: current svn
Keywords: user crash Cc: nopper

Description (last modified by ignotus) (diff)

Crash Report
==========

sys.platform linux2
os.name posix
Gtk version 2.18.3
Umit version 1.0RC

Description


Versions:
---
GTK: 2.18.3
PyGTK: 2.20.0
HIGWidgets: 1.0RC
Python: 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) 
[GCC 4.4.1 20090818 (Red Hat 4.4.1-6)]
Nmap: Nmap version 5.00 ( http://nmap.org )
Operating System: Linux server.example.com 2.6.31.5-127.fc12.x86_64 #1 SMP Sat Nov 7 21:11:14 EST 2009 x86_64
Umit: 1.0RC
UmitCore: 1.0RC
UmitGUI: 1.0RC
---
<type 'exceptions.TypeError'>
Python 2.6.2: /usr/bin/python2.6
Wed Feb 17 14:47:23 2010

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.6/site-packages/umit/plugin/PluginPage.py in __on_row_about(self=<PluginPage object at 0x33d8dc0 (GtkVBox at 0x288af20)>, widget=<gtk.ImageMenuItem object at 0x3426e10 (GtkImageMenuItem at 0x3621830)>, row=<PluginRow object at 0x34218c0 (PluginRow at 0x35ca6d0)>)
  598     def __on_row_about(self, widget, row):
  599         "About menu callback"
  600         self.p_window.engine.tree.show_about(row.reader)
  601 
  602     def __on_row_homepage(self, widget, row):
self = <PluginPage object at 0x33d8dc0 (GtkVBox at 0x288af20)>
self.p_window = <PluginWindow object at 0x33d8870 (GtkWindow at 0x286f850)>
self.p_window.engine = <umit.plugin.Engine.PluginEngine object at 0x2804ed0>
self.p_window.engine.tree = <umit.plugin.Tree.PluginsTree object at 0x2b90c90>
self.p_window.engine.tree.show_about = <bound method PluginsTree.show_about of <umit.plugin.Tree.PluginsTree object at 0x2b90c90>>
row = <PluginRow object at 0x34218c0 (PluginRow at 0x35ca6d0)>
row.reader = [Terminal::Plugin]

 /usr/lib/python2.6/site-packages/umit/plugin/Tree.py in show_about(self=<umit.plugin.Tree.PluginsTree object at 0x2b90c90>, pkg=[Terminal::Plugin])
  636             about_func()
  637         else:
  638             d = Core().about_dialog(pkg)
  639 
  640             d.run()
d undefined
global Core = <class 'umit.plugin.Core.Core'>
).about_dialog = <unbound method Core.about_dialog>
pkg = [Terminal::Plugin]

 /usr/lib/python2.6/site-packages/umit/plugin/Core.py in about_dialog(self=<Core object at 0x2b84eb0 (UmitCore at 0x27a9360)>, pkg=[Terminal::Plugin])
  145         set_field(pkg, d.set_name, 'name')
  146         set_field(pkg, d.set_version, 'version')
  147         set_field(pkg, d.set_copyright, 'copyright')
  148         set_field(pkg, d.set_license, 'license')
  149         set_field(pkg, d.set_website, 'url')
set_field = <function set_field at 0x341a578>
pkg = [Terminal::Plugin]
d = <gtk.AboutDialog object at 0x3426dc0 (GtkAboutDialog at 0x3626020)>
d.set_copyright = <built-in method set_copyright of gtk.AboutDialog object at 0x3426dc0>

 /usr/lib/python2.6/site-packages/umit/plugin/Core.py in set_field(pkg=[Terminal::Plugin], func=<built-in method set_copyright of gtk.AboutDialog object at 0x3426dc0>, field='copyright', c=False)
  141                     attr = [attr, ]
  142 
  143                 func(attr)
  144 
  145         set_field(pkg, d.set_name, 'name')
func = <built-in method set_copyright of gtk.AboutDialog object at 0x3426dc0>
attr = [u'(C) 2009 Adriano Monteiro Marques']
<type 'exceptions.TypeError'>: GtkAboutDialog.set_copyright() argument 1 must be string or None, not list
    __class__ = <type 'exceptions.TypeError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.TypeError object at 0x3413dd0>
    __dict__ = {}
    __doc__ = 'Inappropriate argument type.'
    __format__ = <built-in method __format__ of exceptions.TypeError object at 0x3413dd0>
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.TypeError object at 0x3413dd0>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.TypeError object at 0x3413dd0>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.TypeError object at 0x3413dd0>
    __hash__ = <method-wrapper '__hash__' of exceptions.TypeError object at 0x3413dd0>
    __init__ = <method-wrapper '__init__' of exceptions.TypeError object at 0x3413dd0>
    __new__ = <built-in method __new__ of type object at 0x3034176e60>
    __reduce__ = <built-in method __reduce__ of exceptions.TypeError object at 0x3413dd0>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.TypeError object at 0x3413dd0>
    __repr__ = <method-wrapper '__repr__' of exceptions.TypeError object at 0x3413dd0>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.TypeError object at 0x3413dd0>
    __setstate__ = <built-in method __setstate__ of exceptions.TypeError object at 0x3413dd0>
    __sizeof__ = <built-in method __sizeof__ of exceptions.TypeError object at 0x3413dd0>
    __str__ = <method-wrapper '__str__' of exceptions.TypeError object at 0x3413dd0>
    __subclasshook__ = <built-in method __subclasshook__ of type object at 0x3034176e60>
    __unicode__ = <built-in method __unicode__ of exceptions.TypeError object at 0x3413dd0>
    args = ('GtkAboutDialog.set_copyright() argument 1 must be string or None, not list',)
    message = 'GtkAboutDialog.set_copyright() argument 1 must be string or None, not list'

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/umit/plugin/PluginPage.py", line 600, in __on_row_about
    self.p_window.engine.tree.show_about(row.reader)
  File "/usr/lib/python2.6/site-packages/umit/plugin/Tree.py", line 638, in show_about
    d = Core().about_dialog(pkg)
  File "/usr/lib/python2.6/site-packages/umit/plugin/Core.py", line 147, in about_dialog
    set_field(pkg, d.set_copyright, 'copyright')
  File "/usr/lib/python2.6/site-packages/umit/plugin/Core.py", line 143, in set_field
    func(attr)
TypeError: GtkAboutDialog.set_copyright() argument 1 must be string or None, not list


Attachments

Containers.py (18.4 kB) - added by jdk2588@… 3 years ago.
The patch for the above bug
Containers.diff (410 bytes) - added by jdk2588@… 3 years ago.
patch
patch_377.diff (0.8 kB) - added by luis 3 years ago.

Change History

Changed 3 years ago by jdk2588@…

The patch for the above bug

Changed 3 years ago by jdk2588@…

The argument that is passed in the umit.plugin.Core.py for the set_field() function with the argument func(attr) doesn't take for lists , should be string or None

Changed 3 years ago by jdk2588@…

patch

Changed 3 years ago by ignotus

  • description modified (diff)
  • milestone changed from Umit 1.0RC to Umit 1.0

Changed 3 years ago by luis

Changed 3 years ago by luis

  • cc nopper added

Thanks for the patch.

It's pretty weird. But after apply the patch it is now showing Author in credits. I attached another one.

Note that authors should be a list. [1]

References:

[1] - http://library.gnome.org/devel/pygtk/stable/class-gtkaboutdialog.html#method-gtkaboutdialog--set-translator-credits

Changed 3 years ago by luis

  • status changed from new to closed
  • resolution set to fixed

this bug was already fixed by nopper in r5547

Note: See TracTickets for help on using tickets.