I have got a similar error:
Unable to download because:
'results'
And the tweets have been no longer loaded for several days.
I have tried your solutions but they didn't work
If you can help...
El viernes, 31 de mayo de 2013 05:39:10 UTC+2, 黄祥 escribió:
>
> hi,
>
> just want to report that web2py 2.4.7 admin Recent Tweets not loaded.
> error:
> Unable to download because:
> local variable 'r' referenced before assignment
>
> applications/admin/controllers/default.py
> def twitter():
> session.forget()
> session._unlock(response)
> import gluon.tools
> import gluon.contrib.simplejson as sj
> try:
> if TWITTER_HASH:
> page = urllib.urlopen("
> http://search.twitter.com/search.json?q=%%40%s" % TWITTER_HASH).read()
> data = sj.loads(page, encoding="utf-8")['results']
> d = dict()
> *r = []*
> for e in data:
> d[e["id"]] = e
> r = reversed(sorted(d))
> return dict(tweets=[d[k] for k in r])
> else:
> return 'disabled'
> except Exception, e:
> return DIV(T('Unable to download because:'), BR(), str(e))
>
> ref:
> https://groups.google.com/forum/?fromgroups#!topic/web2py/rtUZeamzXp8
>
> error is gone and also not showing any tweets
>
> if i'm not wrong twitter api had already deprecated, imho, if you want to
> use twitter tweets please use the embeded one provide by twitter
> (timelines, tweets, etc)
>
> ref:
> https://dev.twitter.com/
>
> please correct and forgive me if i'm wrong
>
> best regards
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.