wilbeibi / Instagram2Douban

Deprecated due to Douban shutdown API
http://ins2douban.com (obsoleted)
0 stars 0 forks source link

同步失败错误导致服务器宕机 #35

Open OldPanda opened 8 years ago

wilbeibi commented 8 years ago

你自己assign给你啦~

OldPanda commented 8 years ago

看看好不好解决,周末再说

OldPanda commented 8 years ago

刚刚试运行了一下python server.py --test,报Douban auth error

ERROR:tornado.application:Uncaught exception GET /auth/douban?code=d736ae2e445db48e (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8080', method='GET', uri='/auth/douban?code=d736ae2e445db48e', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'zh-CN,zh;q=0.8,en;q=0.6,en-US;q=0.4,zh-TW;q=0.2', 'Accept-Encoding': 'gzip, deflate, sdch', 'Host': 'localhost:8080', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36', 'Connection': 'keep-alive', 'Cookie': '_ga=GA1.1.1901874891.1446089665; _gat=1', 'Cache-Control': 'max-age=0', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/web.py", line 1415, in _execute
    result = yield result
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/gen.py", line 870, in run
    value = future.result()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/gen.py", line 876, in run
    yielded = self.gen.throw(*exc_info)
  File "server.py", line 30, in get
    code=self.get_argument('code')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/gen.py", line 870, in run
    value = future.result()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
AuthError: Douban Auth Error: HTTPResponse(_body=None,buffer=<_io.BytesIO object at 0x103ff7ad0>,code=403,effective_url='https://www.douban.com/service/auth2/token',error=HTTPError('HTTP 403: Forbidden',),headers={'X-Consumed-Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'Server': 'dae', 'Connection': 'close', 'Date': 'Thu, 29 Oct 2015 03:34:35 GMT', 'Content-Type': 'text/html'},reason='Forbidden',request=<tornado.httpclient.HTTPRequest object at 0x103fc98d0>,request_time=3.8434598445892334,time_info={})

应该是tornado的豆瓣auth库里报出来的:https://github.com/omengye/tornado-douban-oauth2/blob/master/DoubanLoginAuth.py#L64

cc @Wilbeibi

wilbeibi commented 8 years ago

擦~~ 还装逼 cc 个什么啊,就俩人。

wilbeibi commented 8 years ago

是不是 token 过期什么的

OldPanda commented 8 years ago

OldPanda commented 8 years ago

不知道,你去你的豆瓣应用那里看看

OldPanda commented 8 years ago

是response.error才会触发

wilbeibi commented 8 years ago

API Key 087d1fa8c7b0696519775efa57113c2f Secret 74876e47a6d9e46a

OldPanda commented 8 years ago

我看着是好的 明晚继续

wilbeibi commented 8 years ago

"我看着是好的" 这是圣经里的词儿吧

OldPanda commented 8 years ago

原来的主语是“神”

OldPanda commented 8 years ago

目前报错

AuthError: Douban Auth Error: HTTPResponse(_body=None,buffer=<_io.BytesIO object at 0x103e4fa70>,code=403,effective_url='https://www.douban.com/service/auth2/token',error=HTTPError('HTTP 403: Forbidden',),headers={'X-Consumed-Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'Server': 'dae', 'Connection': 'close', 'Date': 'Mon, 09 Nov 2015 01:29:05 GMT', 'Content-Type': 'text/html'},reason='Forbidden',request=<tornado.httpclient.HTTPRequest object at 0x103e9ba90>,request_time=2.2219748497009277,time_info={})

这一行发送请求时,豆瓣服务器返回403 forbidden错误。

@Wilbeibi 是不是我们的key权限的问题?我用的test。