PYTHON3.7 SCRAPY CRAWL 运行出错解决方法SyntaxError: invalid syntax

File "D:\Python37\lib\site-packages\scrapy\extensions\telnet.py", line 12, in <module>
    from twisted.conch import manhole, telnet
  File "D:\Python37\lib\site-packages\twisted\conch\manhole.py", line 154
    def write(self, data, async=False):
                              ^
SyntaxError: invalid syntax

Process finished with exit code 
**

## 解决方法
将源码manhole.py中的async参数更改为async1(注意更换全部(ctrl+R 更换)) 
1.可以直接点击错误跳转 
2.也可以通过文件路径查找 
D:\Python37\Lib\site-packages\twisted\conch\manhole.py
改完再运行就好了

**

猜你喜欢

转载自blog.csdn.net/qq_37699336/article/details/85270853