Gwibber sometimes fails to update streams

Bug #600058 reported by Ben Bromley
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Gwibber
Expired
Undecided
Unassigned

Bug Description

Sometimes Gwibber will refuse to update one out of two of my twitter steams. When I run "gwibber-service -d -o", I get this message:

bsbrom@shadeball:~$ gwibber-service -d -o
Updating...
Gwibber Dispatcher: DEBUG Setting up monitors
Gwibber Dispatcher: DEBUG Monitors are up
Gwibber Dispatcher: INFO Gwibber Service is reloading account credentials
Gwibber Dispatcher: DEBUG Refresh interval is set to 2
Gwibber Dispatcher: DEBUG ** Starting Refresh - Tue Jun 29 16:50:40 2010 **
Gwibber Dispatcher: DEBUG <twitter:private> Performing operation
Gwibber Dispatcher: DEBUG <twitter:receive> Performing operation
Gwibber Dispatcher: ERROR <twitter:private> Operation failed
Gwibber Dispatcher: DEBUG Traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py", line 81, in perform_operation
    message_data = PROTOCOLS[account["protocol"]].Client(account)(opname, **args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 144, in __call__
    return getattr(self, opname)(**args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 156, in private
    return self._get("direct_messages.json", "private", count=count, since_id=since)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 135, in _get
    if parse: return [getattr(self, "_%s" % parse)(m) for m in data]
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 103, in _private
    m = self._message(data)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 78, in _message
    m = self._common(data)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 60, in _common
    m["id"] = str(data["id"])
TypeError: string indices must be integers

Gwibber Dispatcher: DEBUG <twitter:receive> Performing operation
Gwibber Dispatcher: ERROR <twitter:receive> Operation failed
Gwibber Dispatcher: DEBUG Traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py", line 81, in perform_operation
    message_data = PROTOCOLS[account["protocol"]].Client(account)(opname, **args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 144, in __call__
    return getattr(self, opname)(**args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 147, in receive
    return self._get("statuses/home_timeline.json", count=count, since_id=since)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 135, in _get
    if parse: return [getattr(self, "_%s" % parse)(m) for m in data]
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 78, in _message
    m = self._common(data)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 60, in _common
    m["id"] = str(data["id"])
TypeError: string indices must be integers

Gwibber Dispatcher: DEBUG <twitter:responses> Performing operation
Gwibber Dispatcher: DEBUG <twitter:receive> Finished operation
Gwibber Dispatcher: DEBUG <twitter:responses> Performing operation
Gwibber Dispatcher: ERROR <twitter:responses> Operation failed
Gwibber Dispatcher: DEBUG Traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py", line 81, in perform_operation
    message_data = PROTOCOLS[account["protocol"]].Client(account)(opname, **args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 144, in __call__
    return getattr(self, opname)(**args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 153, in responses
    return self._get("statuses/mentions.json", count=count, since_id=since)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 135, in _get
    if parse: return [getattr(self, "_%s" % parse)(m) for m in data]
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 78, in _message
    m = self._common(data)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 60, in _common
    m["id"] = str(data["id"])
TypeError: string indices must be integers

Gwibber Dispatcher: DEBUG <twitter:receive> Performing operation
Gwibber Dispatcher: DEBUG <twitter:responses> Finished operation
Gwibber Dispatcher: DEBUG <twitter:private> Performing operation
Gwibber Dispatcher: DEBUG <twitter:receive> Finished operation
Gwibber Dispatcher: DEBUG <twitter:responses> Performing operation
Gwibber Dispatcher: DEBUG <twitter:private> Finished operation
Gwibber Dispatcher: DEBUG <twitter:private> Performing operation
Gwibber Dispatcher: DEBUG <twitter:responses> Finished operation
Gwibber Dispatcher: DEBUG <twitter:private> Finished operation
Gwibber Dispatcher: INFO Loading complete: 1 - ['Failure', 'Failure', 'Failure', 'Success', 'Success', 'Success', 'Success', 'Success', 'Success']

Revision history for this message
Ben Bromley (benuski) wrote :

Also, this is in the daily Gwibber PPA using Ubuntu Lucid 10.04.

Revision history for this message
Benjamin-Timm Broich (b-broich) wrote :

I get this error again today, it was gone for some days and now its back.

Gwibber Dispatcher: DEBUG Traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py", line 81, in perform_operation
    message_data = PROTOCOLS[account["protocol"]].Client(account)(opname, **args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 147, in __call__
    return getattr(self, opname)(**args)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 150, in receive
    return self._get("statuses/home_timeline.json", count=count, since_id=since)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 138, in _get
    if parse: return [getattr(self, "_%s" % parse)(m) for m in data]
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 78, in _message
    m = self._common(data)
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 60, in _common
    m["id"] = str(data["id"])
TypeError: string indices must be integers, not str

Revision history for this message
Omer Akram (om26er) wrote : Re: [Bug 600058] Re: Gwibber sometimes fails to update streams
Download full text (6.6 KiB)

it think this is just noise not a real error. gwibber-service should give
better logs

On Sun, Aug 1, 2010 at 11:23 AM, Benjamin-Timm Broich <
<email address hidden>> wrote:

> I get this error again today, it was gone for some days and now its
> back.
>
>
> Gwibber Dispatcher: DEBUG Traceback:
> Traceback (most recent call last):
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py",
> line 81, in perform_operation
> message_data = PROTOCOLS[account["protocol"]].Client(account)(opname,
> **args)
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py",
> line 147, in __call__
> return getattr(self, opname)(**args)
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py",
> line 150, in receive
> return self._get("statuses/home_timeline.json", count=count,
> since_id=since)
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py",
> line 138, in _get
> if parse: return [getattr(self, "_%s" % parse)(m) for m in data]
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line
> 78, in _message
> m = self._common(data)
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line
> 60, in _common
> m["id"] = str(data["id"])
> TypeError: string indices must be integers, not str
>
> --
> Gwibber sometimes fails to update streams
> https://bugs.launchpad.net/bugs/600058
> You received this bug notification because you are subscribed to
> Gwibber.
>
> Status in Gwibber: New
>
> Bug description:
> Sometimes Gwibber will refuse to update one out of two of my twitter
> steams. When I run "gwibber-service -d -o", I get this message:
>
> bsbrom@shadeball:~$ gwibber-service -d -o
> Updating...
> Gwibber Dispatcher: DEBUG Setting up monitors
> Gwibber Dispatcher: DEBUG Monitors are up
> Gwibber Dispatcher: INFO Gwibber Service is reloading account
> credentials
> Gwibber Dispatcher: DEBUG Refresh interval is set to 2
> Gwibber Dispatcher: DEBUG ** Starting Refresh - Tue Jun 29 16:50:40 2010
> **
> Gwibber Dispatcher: DEBUG <twitter:private> Performing operation
> Gwibber Dispatcher: DEBUG <twitter:receive> Performing operation
> Gwibber Dispatcher: ERROR <twitter:private> Operation failed
> Gwibber Dispatcher: DEBUG Traceback:
> Traceback (most recent call last):
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py",
> line 81, in perform_operation
> message_data = PROTOCOLS[account["protocol"]].Client(account)(opname,
> **args)
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line
> 144, in __call__
> return getattr(self, opname)(**args)
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line
> 156, in private
> return self._get("direct_messages.json", "private", count=count,
> since_id=since)
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line
> 135, in _get
> if parse: return [getattr(self, "_%s" % parse)(m) for m in data]
> File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line
> 103, in _private
> m = self._message(data)
> File "/usr/lib/python2.6/dist-packages/gwibb...

Read more...

Revision history for this message
Miroslav Zadravec (miro-miroz) wrote :

I had the same error so I did some debugging:

In file "microblog/twitter.py", function "_get(...)", after line 130 "data = network.Download(...)" I've inserted this code:
"print "Data: ", data"
This returned:
Data: {u'errors': [{u'message': u'This account is locked due to too many failed login attempts -- try again in 2216 seconds', u'code': 27}]}

Now I finally see what is the problem (although I'm not sure who generated too many login attempts). Anyway, next line checks for errors but it doesn't catch it:
"if isinstance(data, dict) and data.get("error", 0):"
It won't catch this because key "error" doesn't exist in "data", it's "errors" in my case. "errors" contains list of messages and such case is not handled at all. That's why there is only noise in log.

Revision history for this message
Miroslav Zadravec (miro-miroz) wrote :

Now, after 2216 second passed, I'm getting different data:
Data: {u'errors': [{u'message': u'Could not authenticate you', u'code': 32}]}

I suppose that all those messages should be returned to user (searching returned data for "authenticate" string doesn't seam like a good idea).

Revision history for this message
Bilal Shahid (s9iper1) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

* now Is this reproducible?
if so than which version are you using ?

Changed in gwibber:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Gwibber because there has been no activity for 60 days.]

Changed in gwibber:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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