urllib.error.HTTPError:HTTP错误404:未找到

时间:2016-06-06 18:17:45

标签: python mongodb

我正在尝试运行一个脚本来从API中获取dada并将其提供给mongodb数据库。而且我一直收到这个错误,但如果我测试一个单独的网址就可以了。

有什么建议吗?

完整脚本http://pastebin.com/Xap5vYYC

Traceback (most recent call last):
  File "hmsParser.py", line 112, in <module>
    smReply = urlopen(smUrl).read().decode("utf8")
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 162, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 471, in open
    response = meth(req, response)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 581, in http_response
    'http', request, response, code, msg, hdrs)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 509, in error
    return self._call_chain(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 589, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: NOT FOUND

0 个答案:

没有答案