我正在尝试将scrapy用于我的项目&经过一些初步的努力,我开始https://doc.scrapy.org/en/latest/intro/tutorial.html
当我使用时:
scrapy startproject tutorial
它引发了我的错误:
ubuntu@ip-10-241-62-56:~/Selenim$ scrapy startproject tutorial
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 7, in <module>
from scrapy.cmdline import execute
File "/usr/local/lib/python2.7/dist-packages/scrapy/__init__.py", line 34, in <module>
from scrapy.spiders import Spider
File "/usr/local/lib/python2.7/dist-packages/scrapy/spiders/__init__.py", line 10, in <module>
from scrapy.http import Request
File "/usr/local/lib/python2.7/dist-packages/scrapy/http/__init__.py", line 10, in <module>
from scrapy.http.request import Request
File "/usr/local/lib/python2.7/dist-packages/scrapy/http/request/__init__.py", line 13, in <module>
from scrapy.utils.url import escape_ajax
File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/url.py", line 15, in <module>
from w3lib.url import _safe_chars, _unquotepath
ImportError: cannot import name _unquotepath
我如何解决这个问题?
答案 0 :(得分:1)
升级w3lib(到1.15.0)解决了我的问题。