Python3.7 Scrapy 提示def write(self,data,asyc) 语法错误

Scrapy 执行爬虫任务,提示如下错误信息如下:

from twisted.conch import manhole, telnet 
File “D:\python3.6\Lib\site-packages\twisted\conch\manhole.py”, line 154 
def write(self, data, async=False): 
^ 
SyntaxError: invalid syntax

错误产生原因:python3.7中把 async当成关键字了,关键字当作参数,python抛出异常.

解决办法:找到D:\python3.6\Lib\site-packages\twisted\conch\manhole.py 文件,全局替换async.

猜你喜欢

转载自blog.csdn.net/zhouzhiwengang/article/details/88809447
今日推荐