lxyu / weibo

Python sina weibo sdk. More simpler and cleaner than the official one.
http://lxyu.github.io/weibo/
236 stars 82 forks source link

真的问题大 #14

Closed chengshuyi closed 8 years ago

chengshuyi commented 8 years ago

Traceback (most recent call last): File "test.py", line 24, in search(t) File "/home/chengshuyi/python/weibo/search.py", line 8, in search c = Client(API_KEY, API_SECRET, REDIRECT_URI, token) File "/usr/local/lib/python2.7/dist-packages/weibo.py", line 45, in init self.set_token(token) File "/usr/local/lib/python2.7/dist-packages/weibo.py", line 84, in set_token self.uid = token['uid'] TypeError: string indices must be integers, not str

lxyu commented 8 years ago

token 应该是 dict 类型。根据 traceback,你的代码里写成 str 类型了。请检查自己代码的错误。