使用的是Python3.7,安装完scrapy和一些依赖的库后运行scrapy crawl spidertieba。出现报错,报错信息是:
File "c:\users\administrator.user-20160420ae\appdata\local\programs\python\pyt
hon37-32\lib\site-packages\twisted\conch\manhole.py", line 154
def write(self, data, async=False):
^
SyntaxError: invalid syntax
解决方案:
打开目录的源码文件(错误提示里有)
将变量名async换一个名字,例如换成shark,(全部都替换掉)就可以编译过了
def write(self, data, shark=False):