Invalid member name

Bug #795274 reported by Wolfgang Arlt
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Pidgin-Screenlet
Fix Committed
Undecided
Unassigned

Bug Description

Pidgin-Screenlet doesn't start.

Pidgin-Screenlet v0.3.5+
Pidgin v2.7.11

Output from Console:
Traceback (most recent call last):
  File "PidginScreenlet.py", line 1653, in <module>
    screenlets.session.create_session(PidginScreenlet)
  File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 474, in create_session
    session.start()
  File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 239, in start
    if self.__load_instances():
  File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 401, in __load_instances
    sl.finish_loading()
  File "/usr/lib/pymodules/python2.7/screenlets/__init__.py", line 1400, in finish_loading
    self.on_init()
  File "PidginScreenlet.py", line 1514, in on_init
    self.pidgin = self.getPidginDbus()
  File "PidginScreenlet.py", line 732, in getPidginDbus
    self.bindSignals()
  File "PidginScreenlet.py", line 466, in bindSignals
    self.bindPurpleSignal(self.onBuddySignedOn, _("BuddySignedOn"))
  File "PidginScreenlet.py", line 457, in bindPurpleSignal
    self.bus.add_signal_receiver(function,dbus_interface=self.purple_interface,signal_name=signal)
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 151, in add_signal_receiver
    path, **keywords)
  File "/usr/lib/pymodules/python2.7/dbus/connection.py", line 398, in add_signal_receiver
    signal_name, handler_function, **keywords)
  File "/usr/lib/pymodules/python2.7/dbus/connection.py", line 67, in __init__
    validate_member_name(member)
ValueError: Invalid member name 'Kontakt hat sich angemeldet': contains invalid character ' '

Revision history for this message
Nicolas Krzywinski (nsk7even) wrote :

I _avoided_ the crash with embracing self.bus.add_signal_receiver() in bindPurpleSignal() into try/catch.

I don't know the Pidgin/Purple/DBus mechanism, though it seems to me that the error belongs to the Pidgin/Purple api and the above try/catch merely is a workaround.

Revision history for this message
Nicolas Krzywinski (nsk7even) wrote :

I _avoided_ the crash with embracing self.bus.add_signal_receiver() in bindPurpleSignal() into try/catch.

I don't know the Pidgin/Purple/DBus mechanism, though it seems to me that the error belongs to the Pidgin/Purple api and the above try/catch merely is a workaround.

Revision history for this message
Nicolas Krzywinski (nsk7even) wrote :

I _avoided_ the crash with embracing self.bus.add_signal_receiver() in bindPurpleSignal() into try/catch.

I don't know the Pidgin/Purple/DBus mechanism, though it seems to me that the error belongs to the Pidgin/Purple api and the above try/catch merely is a workaround.

Revision history for this message
Nicolas Krzywinski (nsk7even) wrote :

Uuuuh sry for the reload spam...

Revision history for this message
Nicolas Krzywinski (nsk7even) wrote :

Hello again,

as I said, my previous patch helped only to start without crash but was no real workaround as it was functionality missing then (no buddy list refresh on buddies joining and leaving).

Now I identified the real problem:
   There are registers of dbus signals using signal names that are localized!

In the "msgunfmt -o pidgin-screenlet.po pidgin-screenlet.mo" created po file I can see that there are localized strings for e. g.:
   msgid "BuddySignedOn"
   msgstr "Kontakt hat sich angemeldet"
and more strings that correspond to signal names...

Therefore I removed those localization for dbus signal names in the attached patch.
But I see sense in catching an error as well if s. th. goes wrong with self.bus.add_signal_receiver, so I completed the try/catch from my prior patch with an error message printout.

Now this is working with all tested signals.
Nicolas

Revision history for this message
Nicolas Krzywinski (nsk7even) wrote :

Fix committed at http://bazaar.launchpad.net/~indiv-screenlets-dev/indiv-screenlets/trunk/revision/1109
The bug was never present in https://code.launchpad.net/~pidgin-screenlet-team/pidgin-screenlet/trunk and occurred only due to localization changes in the indiv-screenlets code.

Changed in pidgin-screenlet:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.