GNOME Bugzilla – Bug 788679
AttributeError: 'gi.repository.RB' object has no attribute 'error_dialog'
Last modified: 2018-05-24 19:30:44 UTC
Encountered the following trace in Magnatune plugin. Traceback (most recent call last):
+ Trace 238032
v = callback(data, *args)
RB.error_dialog(title = _("Error"),
self.__name__, name))
The rb_error_dialog is not introspectable from RB-3.0.gir. <function name="error_dialog" c:identifier="rb_error_dialog" introspectable="0">
Affects magnatune and replaygain plugin. ./magnatune/MagnatuneSource.py:192: RB.error_dialog(title = _("Couldn't download album"), ./magnatune/MagnatuneSource.py:255: RB.error_dialog(title=_("Unable to load catalog"), ./magnatune/MagnatuneSource.py:406: RB.error_dialog(title = _("Download Error"), ./magnatune/MagnatuneSource.py:410: RB.error_dialog(title = _("Error"), ./replaygain/player.py:53: RB.error_dialog(shell.props.window, _("ReplayGain GStreamer plugins not available"), msg)
Non-introspectable functions/methods: When you work with PyGI for a longer time, you'll inevitably stumble over a method that simply doesn't exist in the bindings. These usually are marked with introspectable="0" in the GIR. Another common case are functions which take a variable number of arguments, such as gtk_cell_area_add_with_properties(). Varargs cannot be handled safely by libgirepository. In these cases there are often alternatives available (such as gtk_cell_area_cell_set_property()). For other cases libraries now often have a ..._v() counterpart which takes a list instead of variable arguments. Ref: https://wiki.gnome.org/Projects/PyGObject/IntrospectionPorting Suggestions ?
Created attachment 361746 [details] [review] widgets: Add non var_args version of rb_error_dialog ( rb_error_dialog_simple ) for use in python
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/1596.