When getting timeline: TypeError: 'NoneType' object is unsubscriptable

Bug #623309 reported by James Ogley
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Gwibber
Fix Released
Undecided
Ken VanDine
gwibber (Ubuntu)
Fix Released
Undecided
Ken VanDine

Bug Description

Using latest trunk, this occurs (output from gwibber-service -do):

Gwibber Dispatcher: ERROR <twitter:receive> Operation failed
Gwibber Dispatcher: DEBUG Traceback:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/gwibber/microblog/dispatcher.py", line 71, in perform_operation
    message_data = PROTOCOLS[account["service"]].Client(account)(opname, **args)
  File "/usr/lib64/python2.6/site-packages/gwibber/microblog/twitter.py", line 193, in __call__
    return getattr(self, opname)(**args)
  File "/usr/lib64/python2.6/site-packages/gwibber/microblog/twitter.py", line 196, in receive
    return self._get("statuses/home_timeline.json", count=count, since_id=since)
  File "/usr/lib64/python2.6/site-packages/gwibber/microblog/twitter.py", line 184, in _get
    if parse: return [getattr(self, "_%s" % parse)(m) for m in data]
  File "/usr/lib64/python2.6/site-packages/gwibber/microblog/twitter.py", line 98, in _message
    m = self._common(data)
  File "/usr/lib64/python2.6/site-packages/gwibber/microblog/twitter.py", line 64, in _common
    m["mid"] = str(data["id"])
TypeError: 'NoneType' object is unsubscriptable

Related branches

Revision history for this message
B. Oppa (0tonyforster0) wrote :

Same here - twitter:receive fails with the exact same TypeError: 'NoneType' object is unsubscriptable.

Revision history for this message
Captain Chaos (launchpad-chaos) wrote :

Same is happening for me, and I'm not using the latest trunk, but the latest official version from the Ubuntu repositories. I'm on Lucid 64-bit and the version of Gwibber is 2.30.1-0ubuntu1. Since this morning, Twitter message are no longer being shown by Gwibber, and the exact same message as listed above is displayed by gwibber-service.

Revision history for this message
Charlesschaefer (charlesschaefer) wrote :

I've read the Twitter class code and changed some things trying to the discover the cause of the bug. I think there's something new with twitter (i don't know how is the tech spec about the json format returned by twitter), but for some messages, theres a null value in the returned json.

I've corrected this bug adding this little hack to twitter.py, at line 78:

def _message(self, data): # this line already exists
    if type(data) == type(None) :
       return []

Revision history for this message
Charlesschaefer (charlesschaefer) wrote :

I've forgot to say that my gwibber version is 2.30.1-0ubuntu.

Revision history for this message
James Ogley (riggwelter) wrote :

I can confirm that the change in comment #3 fixes this.

Changed in gwibber (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
Changed in gwibber:
assignee: nobody → Ken VanDine (ken-vandine)
status: New → Fix Committed
milestone: none → 2.31.91
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gwibber - 2.31.91-0ubuntu1

---------------
gwibber (2.31.91-0ubuntu1) maverick; urgency=low

  * New upstream release
    - Port twitter service to OAuth, basic auth is no longer
      supported (LP: #627565)
    - Delay setting the position of the vertical splitter
    - Fix PerformOp for single operation, including delete and
      like (LP: #616798)
    - Make the string for the Translate action i18n
      friendly (Vadim Rutkovsky)
    - Convert identi.ca groups (!) to hashtags (#) for re-denting if
      global_retweet is true (Vadim Rutkovsky) (LP: #539786)
    - Handle null responses gracefully (James Ogley) (LP: #623309)
    - recognize valid unicode URLs (LP: #333390)
    - Don't crash if there is an invalid value for a preference (LP: #623335)
  * debian/gwibber-service.install
    - Install files needed for twitter oauth
 -- Ken VanDine <email address hidden> Mon, 23 Aug 2010 23:35:05 -0400

Changed in gwibber (Ubuntu):
status: New → Fix Released
Changed in gwibber:
status: Fix Committed → Fix Released
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.