Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错了,centos+py3.7.1 #14

Open
amhoho opened this issue Nov 27, 2018 · 3 comments
Open

报错了,centos+py3.7.1 #14

amhoho opened this issue Nov 27, 2018 · 3 comments

Comments

@amhoho
Copy link

amhoho commented Nov 27, 2018

     File "/usr/local/lib/python3.7/site-packages/scrapy/middleware.py", line 34, in from_settings
        mwcls = load_object(clspath)
      File "/usr/local/lib/python3.7/site-packages/scrapy/utils/misc.py", line 44, in load_object
        mod = import_module(module)
      File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/usr/local/lib/python3.7/site-packages/scrapy/extensions/telnet.py", line 12, in <module>
        from twisted.conch import manhole, telnet
      File "/usr/local/lib/python3.7/site-packages/twisted/conch/manhole.py", line 154
        def write(self, data, async=False):
                                  ^
    SyntaxError: invalid syntax
@amhoho
Copy link
Author

amhoho commented Nov 27, 2018

把文件"/usr/local/lib/python3.7/site-packages/twisted/conch/manhole.py"中的async全改成async1,可以了.顺利跑起来,发现抓取的效率不太理想啊,一分钟抓了60个.

@Karmenzind
Copy link
Owner

这个可能是twisted和py3.7兼容的问题吧,我没有遇到过,后续研究一下

你换3.6试试?

@amhoho
Copy link
Author

amhoho commented Nov 28, 2018

3.6正常了,可能是我2.7和3.7同时存在引起.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants