Ticket #1347 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

gajim 0.9.1 dies because of new libnotify-daemon

Reported by: Nafallo Owned by: asterix
Priority: normal Milestone: 0.10
Component: None Version: 0.9.1
Severity: major Keywords:
Cc: shermann@…, zdzichu@…, lorien420@… Blocked By:
OS: Blocking:

Description

Traceback (most recent call last):

File "gajim.py", line 1254, in process_connections

gajim.mutex_events_for_ui.lock(self.exec_event, account)

File "/usr/lib/python2.4/mutex.py", line 41, in lock

function(argument)

File "gajim.py", line 1239, in exec_event

self.handlers[ev[0]](account, ev[1])

File "gajim.py", line 389, in handle_event_notify

notify.notify(_('Contact Signed In'), jid, account)

File "/usr/share/gajim/src/notify.py", line 56, in notify

DesktopNotification?(event_type, jid, account, msg_type, file_props)

File "/usr/share/gajim/src/notify.py", line 195, in init

[dbus.String(path)], {'default':0}, [], True, dbus.UInt32(5))

File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 67, in call

iter.append_strict(arg, sig)

File "dbus_bindings.pyx", line 1012, in dbus_bindings.MessageIter?.append_strict File "dbus_bindings.pyx", line 1179, in dbus_bindings.MessageIter?.append_string

AttributeError?: 'Byte' object has no attribute 'encode'

This is with gajim=0.9.1-2ubuntu1 on dapper. We have dbus 0.60 and the troubles started with when notify-daemon 0.3.1 hit the archives (I think). Would be nice to see this fixed for gajim 0.9.2 :-).

Attachments

gajim-libnotify-0.3.x.diff (1.0 KB) - added by Tomasz Torcz <zdzichu@…> 4 years ago.
work with ibnotify 0.3.x API
version_checking.diff (1.6 KB) - added by Andrew Sayman <lorien420@…> 4 years ago.
Looks at version numbers rather than just the error

Change History

Changed 4 years ago by nk

gedit ~/.gajim/config

do so you have:

use_notif_daemon = False

as for the TB, I'm looking for a way to repo & fix and if I can I really have some "nice" words for breaking the api of notif daemon

Changed 4 years ago by Tomasz Torcz <zdzichu@…>

work with ibnotify 0.3.x API

Changed 4 years ago by Tomasz Torcz <zdzichu@…>

  • cc zdzichu@… added

Check attached patch. New api looks like (info obtained with dbus-viewer):

Notify(s appname, s icon, u id, s header, s text, as str_ret, a{sv} hints, i timeout_ms)

Changed 4 years ago by asterix

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

Changed 4 years ago by nafallo@…

  • status changed from closed to reopened
  • resolution fixed deleted

nafallo@darkelf:~ $ gajim /usr/share/gajim/src/roster_window.py:2563: GtkWarning?: gtk_accel_label_set_accel_closure: assertion `gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed

LaunchpadIntegration?.add_items(widget,1,True,False)

Traceback (most recent call last):

File "gajim.py", line 1254, in process_connections

gajim.mutex_events_for_ui.lock(self.exec_event, account)

File "/usr/lib/python2.4/mutex.py", line 41, in lock

function(argument)

File "gajim.py", line 1239, in exec_event

self.handlers[ev[0]](account, ev[1])

File "gajim.py", line 489, in handle_event_msg

notify.notify(_('New Message'), jid, account, msg_type)

File "/usr/share/gajim/src/notify.py", line 56, in notify

DesktopNotification?(event_type, jid, account, msg_type, file_props)

File "/usr/share/gajim/src/notify.py", line 199, in init

dbus.String(txt), dbus.String(""), {}, dbus.UInt32(timeout/1000))

NameError?: global name 'timeout' is not defined

Still now working. Different error though :-).

Changed 4 years ago by asterix

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

please svn revert src/notify.py. You probably modified this file manualy.

Changed 4 years ago by Tomasz Torcz <zdzichu@…>

Ahh, this backtrace shows my typo as a side effect. Converting from seconds to milliseconds should be "timeout*1000", not "timeout/1000".

Changed 4 years ago by Andrew Sayman <lorien420@…>

  • cc lorien420@… added

I haven't seen the new version of libnotify yet, but is there a way to get the version information from dbus? It seems like that would be a better way to handle this than just trapping an error.

Changed 4 years ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted

indeed it would be nice if possible, I reopen for that.

Changed 4 years ago by Andrew Sayman <lorien420@…>

It is possible, I'll get a patch up tonight.

Changed 4 years ago by Andrew Sayman <lorien420@…>

Looks at version numbers rather than just the error

Changed 4 years ago by Andrew Sayman <lorien420@…>

I don't have a lot of time to work on this since school has started up, but here's the gist of a patch that I think handles the situation more correctly. Rather than just trying and failing, we first check the version number.

It should be noted that the galago project never officially announced this new version. Talking to chip it seems that this is largely because it's not ready. Version 0.3.1 doesn't seem to implement the whole spec, including GetServerInfo?(rmation).

Changed 4 years ago by asterix

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

thx a lot, I aplied it in [8d2f8a318f4157b349335008c162a9905e762a5a]

Add/Change #1347 (gajim 0.9.1 dies because of new libnotify-daemon)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
Next status will be 'needinfo'
 
Note: See TracTickets for help on using tickets.