access_token出错
linger灵儿fly 发布于2018-05 浏览:2178 回复:1
0
收藏
快速回复

Traceback (most recent call last):
File "/home/lijinling/PycharmProjects/ID/1/1.py", line 7, in
response = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 401: Unauthorized

Process finished with exit code 1

收藏
点赞
0
个赞
共1条回复 最后由goJhou回复于2018-05
#2goJhou回复于2018-05

所有百度接口都需要用access_Token去鉴权的。调接口前先拿一下token。token有效期30天

0
TOP
切换版块