gwibber crashes on load with KeyError on sender

Bug #616582 reported by Jonathan Elchison
82
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Gwibber
Confirmed
Undecided
Unassigned

Bug Description

Upon loading gwibber, I receive the following output:

----------
** (gwibber:25512): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (gwibber:25512): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (gwibber:25512): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
No dbus monitor yet
Updating...
Updating...
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 67, in <module>
    client.Client()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 447, in __init__
    self.w = GwibberClient()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 58, in __init__
    self.setup_ui()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 144, in setup_ui
    self.stream_view.set_state(self.model.settings["streams"] or DEFAULT_SETTINGS["streams"])
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 438, in set_state
    self.update()
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 426, in update
    self.message_view.render([self.navigation.selected_stream["view"]])
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 736, in render
    accounts=accounts)
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 278, in render
    content = template.render(theme=util.get_theme_colors(), resources=resources, _=_, **kwargs)
  File "/usr/lib/pymodules/python2.6/mako/template.py", line 133, in render
    return runtime._render(self, self.callable_, args, data)
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 364, in _render
    _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 381, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 414, in _exec_template
    callable_(context, *args, **kwargs)
  File "memory:0x1a60650", line 207, in render_body
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 255, in <lambda>
    return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
  File "base_mako", line 805, in render_messages
  File "memory:0x1a60650", line 84, in message
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 255, in <lambda>
    return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
  File "base_mako", line 317, in render_sidebar
KeyError: 'sender'
----------

After this, gwibber exits, and no windows appear. However, `ps ax | grep gwibber` after the fact reveals the following:

----------
25549 ? SLl 0:00 /usr/bin/python /usr/bin/gwibber-service
----------

This is repeatable, every time.

Installed Gwibber version: 2.30.1-0ubuntu1
Running Ubuntu 10.04.1 LTS
List of installed packages is attached.

Linux kernel: 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux

Tags: gwibber
Revision history for this message
Jonathan Elchison (jelchison) wrote :
tags: added: gwibber
Revision history for this message
Elisiano Petrini (elisiano) wrote :

Same here.
Maybe it's worth mentioning that it's a 64bit system.

Linux XXXXX 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04.1 LTS

Revision history for this message
Michael B. Trausch (mtrausch) wrote :

I can also confirm this on Lucid:

mbt@zest:~$ gwibber

** (gwibber:3704): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (gwibber:3704): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (gwibber:3704): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
Updating...
Updating...
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 67, in <module>
    client.Client()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 447, in __init__
    self.w = GwibberClient()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 58, in __init__
    self.setup_ui()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 144, in setup_ui
    self.stream_view.set_state(self.model.settings["streams"] or DEFAULT_SETTINGS["streams"])
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 438, in set_state
    self.update()
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 426, in update
    self.message_view.render([self.navigation.selected_stream["view"]])
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 736, in render
    accounts=accounts)
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 278, in render
    content = template.render(theme=util.get_theme_colors(), resources=resources, _=_, **kwargs)
  File "/usr/lib/pymodules/python2.6/mako/template.py", line 133, in render
    return runtime._render(self, self.callable_, args, data)
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 364, in _render
    _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 381, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 414, in _exec_template
    callable_(context, *args, **kwargs)
  File "memory:0x32bff90", line 207, in render_body
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 255, in <lambda>
    return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
  File "base_mako", line 805, in render_messages
  File "memory:0x32bff90", line 84, in message
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 255, in <lambda>
    return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
  File "base_mako", line 317, in render_sidebar
KeyError: 'sender'
mbt@zest:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
mbt@zest:~$

Changed in gwibber:
status: New → Confirmed
description: updated
Revision history for this message
poppanator (pontus-poppa) wrote :

I too experience this on a 64-bit install. Worth mentioning: Maybe a coincident but I changed my avatar at gravatar.com (which shows in Twitter messages) as well as my Facebook profile photo. Gwibber stopped working in relation to this.

Revision history for this message
osmanza (osmanza-deactivatedaccount) wrote :

I'm also experiencing this issue today after I updated my box using Update Manager. It was not up to date (+30 days)

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid

$uname -a
Linux xxxxxx 2.6.32-24-generic #41-Ubuntu SMP Thu Aug 19 01:38:40 UTC 2010 x86_64 GNU/Linux

Revision history for this message
Matt Hoskins (matt-nipltd) wrote :

Having a look at the code, it seems that the facebook code for gwibber in lucid doesn't always initialise the sender part of a message to an empty dict, so if the code lower down doesn't set it then it will cause a problem (it looks like code for other systems like twitter etc always initialise the sender as blank).

To fix the problem on my system I edited:
/usr/lib/python2.6/dist-packages/gwibber/microblog/facebook.py

I found the code reading:
    if data.get("actor_id", 0) in profiles:
      m["sender"] = self._sender(profiles[data["actor_id"]])

And after it added:
    else:
      m["sender"] = {}

Unfortunately couchdb for gwibber will have cached the problem entry. I went for the easy option of clearing it out by removing the data file (as gwibber will just regrab the content). So I killed off gwibber, gwibber-service and the couchdb service and then removed:
~/.local/share/desktop-couch/gwibber_messages.couch

Starting up gwibber and everything now behaves.

Revision history for this message
Tom Inglis (tominglis) wrote : Re: [Bug 616582] Re: gwibber crashes on load with KeyError on sender

Nice, that seemed to do the trick - thanks dude!

On Tue, 2010-08-24 at 12:05 +0000, Matt Hoskins wrote:
> Having a look at the code, it seems that the facebook code for gwibber
> in lucid doesn't always initialise the sender part of a message to an
> empty dict, so if the code lower down doesn't set it then it will cause
> a problem (it looks like code for other systems like twitter etc always
> initialise the sender as blank).
>
> To fix the problem on my system I edited:
> /usr/lib/python2.6/dist-packages/gwibber/microblog/facebook.py
>
> I found the code reading:
> if data.get("actor_id", 0) in profiles:
> m["sender"] = self._sender(profiles[data["actor_id"]])
>
> And after it added:
> else:
> m["sender"] = {}
>
> Unfortunately couchdb for gwibber will have cached the problem entry. I went for the easy option of clearing it out by removing the data file (as gwibber will just regrab the content). So I killed off gwibber, gwibber-service and the couchdb service and then removed:
> ~/.local/share/desktop-couch/gwibber_messages.couch
>
> Starting up gwibber and everything now behaves.
>

Revision history for this message
jac0b (jacbrooks) wrote :

I did the above steps in post #6 but it still won't open for me. How do I kill the couchdb service I don't see it in my running processes?

Revision history for this message
Michael B. Trausch (mtrausch) wrote :

@jac0b:

killall desktopcouch-service

Do that until it says "desktopcouch-service: no process found"

I can confirm that the workaround in #6 works. I will prepare a debdiff tonight for this bug to fix the problem in Gwibber, if I can find a less invasive and automatic method of cleaning up the CouchDB as well.

Revision history for this message
Tomas 'tt' Krag (tt) wrote :

Unfortunately workaround #6 does not work in my case. I've made the changes, killed off both gwibber-service and desktopcouch-service, deleted the gwibber_messages file and restarted gwibber. It still crashes with the same error message as before.

Revision history for this message
JAlcala (jalcalav) wrote :

Last update to Gwibber 2.30.2-0ubuntu1 throws same error. Annoying problem.

Revision history for this message
rzoch (rzoch) wrote :

Experiencing the same problem for the past month or more as well.

- Linux 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux

Revision history for this message
Misosofos (misosofos) wrote :

A fix, please! If we update to the PPA of Gwibber (the only way I solved this issue) the enter text on the Me Menu disappears!

Revision history for this message
JAlcala (jalcalav) wrote :

Maverick fixes this problem (Gwibber 2.32.0.1)

Revision history for this message
Jonathan Elchison (jelchison) wrote :

Problem still exists with Gwibber 2.30.3-0ubuntu1 on Ubuntu 10.04.1 LTS:

----------
** (gwibber:26826): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (gwibber:26826): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (gwibber:26826): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
Updating...
Updating...
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 67, in <module>
    client.Client()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 448, in __init__
    self.w = GwibberClient()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 59, in __init__
    self.setup_ui()
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 145, in setup_ui
    self.stream_view.set_state(self.model.settings["streams"] or DEFAULT_SETTINGS["streams"])
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 439, in set_state
    self.update()
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 427, in update
    self.message_view.render([self.navigation.selected_stream["view"]])
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 737, in render
    accounts=accounts)
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 279, in render
    content = template.render(theme=util.get_theme_colors(), resources=resources, _=_, **kwargs)
  File "/usr/lib/pymodules/python2.6/mako/template.py", line 133, in render
    return runtime._render(self, self.callable_, args, data)
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 364, in _render
    _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 381, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 414, in _exec_template
    callable_(context, *args, **kwargs)
  File "memory:0x1959150", line 207, in render_body
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 255, in <lambda>
    return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
  File "base_mako", line 805, in render_messages
  File "memory:0x1959150", line 84, in message
  File "/usr/lib/pymodules/python2.6/mako/runtime.py", line 255, in <lambda>
    return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
  File "base_mako", line 317, in render_sidebar
KeyError: 'sender'
----------

Kernel: Linux xxxxx 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 10:14:11 UTC 2010 x86_64 GNU/Linux

Revision history for this message
Omer Akram (om26er) wrote :

John install gwibber 2.32.2 from gwibber team's ppa. is the stable version and should fix your problem https://launchpad.net/~gwibber-team/+archive/ppa

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.