尝试修复urllib.error.HTTPError:HTTP错误404:找不到

时间:2019-05-14 13:45:46

标签: python-3.x pandas urllib

我试图复制此项目: https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c

我收到此错误消息:

DELETE FROM LIST_ITEMS WHERE ENTRY_ID IN (id1, id2, id2, ... );

我认为csv-cleanup出了点问题。我手动清理它,现在出现此错误:

      raise URLError('unknown url type: %s' % type)
      urllib.error.URLError: <urlopen error unknown url type: 5;"https>

URL显然可以在我的浏览器中工作。

此循环中的某些内容似乎出错了(第三行?):

      File "C:\Users\\Desktop\\test.py", line 34, in <module>
article=urlopen(req).read()
      File "C:\Program Files\Python36\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
      File "C:\Program Files\Python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
      File "C:\Program Files\Python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
      File "C:\Program Files\Python36\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
      File "C:\Program Files\Python36\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
      File "C:\Program Files\Python36\lib\urllib\request.py", line 650, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
      urllib.error.HTTPError: HTTP Error 404: Not Found

如何解决此问题?也许我应该回过头来解决提到的第一个错误?

0 个答案:

没有答案