taizilongxu / douban.fm

:radio: douban.fm based on Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mac下启动有错误doubanfm.exceptions.APIError

liyouvane opened this issue · comments

之前还好好的,今天打开的时候就报错了。。。

Traceback (most recent call last):
File "/usr/local/bin/douban.fm", line 9, in
load_entry_point('douban.fm==0.4.13', 'console_scripts', 'douban.fm')()
File "/usr/local/lib/python2.7/site-packages/doubanfm/douban.py", line 87, in main
Router()
File "/usr/local/lib/python2.7/site-packages/doubanfm/douban.py", line 46, in init
self.data = data.Data()
File "/usr/local/lib/python2.7/site-packages/doubanfm/data.py", line 23, in init
self.playlist = Playlist()
File "/usr/local/lib/python2.7/site-packages/doubanfm/model.py", line 38, in init
self._get_first_song()
File "/usr/local/lib/python2.7/site-packages/doubanfm/model.py", line 55, in _func
return func(_args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/doubanfm/model.py", line 77, in _get_first_song
song = douban.get_first_song()
File "/usr/local/lib/python2.7/site-packages/doubanfm/API/api.py", line 144, in get_first_song
return self.requests_url('n')
File "/usr/local/lib/python2.7/site-packages/doubanfm/API/api.py", line 135, in requests_url
raise APIError(err)
doubanfm.exceptions.APIError: list index out of range

我看了issue#118和我的问题似乎一样,然而我即使在浏览器上登陆听歌了也仍然报错。

是不是是cookie过期了, 删除~/.doubanfm_token 然后重新登录看一看

嗯 谢谢 解决了~

Traceback (most recent call last):
  File "/usr/local/bin/douban.fm", line 9, in <module>
    load_entry_point('douban.fm==0.4.15', 'console_scripts', 'douban.fm')()
  File "/usr/local/lib/python2.7/site-packages/doubanfm/douban.py", line 101, in main
    router = Router()
  File "/usr/local/lib/python2.7/site-packages/doubanfm/douban.py", line 47, in __init__
    self.data = data.Data()
  File "/usr/local/lib/python2.7/site-packages/doubanfm/data.py", line 23, in __init__
    self.playlist = Playlist()
  File "/usr/local/lib/python2.7/site-packages/doubanfm/model.py", line 40, in __init__
    self._get_first_song()
  File "/usr/local/lib/python2.7/site-packages/doubanfm/model.py", line 57, in _func
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/doubanfm/model.py", line 82, in _get_first_song
    song = douban.get_first_song()
  File "/usr/local/lib/python2.7/site-packages/doubanfm/API/api.py", line 172, in get_first_song
    return self.requests_url('n')
  File "/usr/local/lib/python2.7/site-packages/doubanfm/API/api.py", line 163, in requests_url
    raise APIError(err)
doubanfm.exceptions.APIError: list index out of range`

出现这个报错数据

登录的账号是不是豆瓣的账号密码