After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788679 - AttributeError: 'gi.repository.RB' object has no attribute 'error_dialog'
AttributeError: 'gi.repository.RB' object has no attribute 'error_dialog'
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Plugins (other)
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-08 17:16 UTC by gkrithi8
Modified: 2018-05-24 19:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
widgets: Add non var_args version of rb_error_dialog ( rb_error_dialog_simple ) for use in python (6.68 KB, patch)
2017-10-17 14:17 UTC, gkrithi8
none Details | Review

Description gkrithi8 2017-10-08 17:16:23 UTC
Encountered the following trace in Magnatune plugin.

Traceback (most recent call last):
  • File "/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/rb/Loader.py", line 32 in call_callback
    v = callback(data, *args)
  • File "/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/magnatune/MagnatuneSource.py", line 426 in auth_data_cb
    RB.error_dialog(title = _("Error"),
  • File "/usr/lib/python3/dist-packages/gi/module.py", line 139 in __getattr__
    self.__name__, name))
AttributeError: 'gi.repository.RB' object has no attribute 'error_dialog'

The rb_error_dialog is not introspectable from RB-3.0.gir.
 
    <function name="error_dialog"
              c:identifier="rb_error_dialog"
              introspectable="0">
Comment 1 gkrithi8 2017-10-08 17:17:56 UTC
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)
Comment 2 gkrithi8 2017-10-09 16:21:09 UTC
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 ?
Comment 3 gkrithi8 2017-10-17 14:17:26 UTC
Created attachment 361746 [details] [review]
widgets: Add non var_args version of rb_error_dialog ( rb_error_dialog_simple ) for use in python
Comment 4 GNOME Infrastructure Team 2018-05-24 19:30:44 UTC
-- 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.