Getting ImportError when starting pyspider in Terminal

170 Views Asked by At

When I start pyspider by pyspider all in terminal, it pops out an ImportError:

ImportError: cannot import name 'Curlasync_HTTPClient' from 'tornado.curl_httpclient'
(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tornado/curl_httpclient.py)

There's some other texts in the error message, but I think this is the main cause.

I tried to reinstall tornado by reinstalling tornado(4.5.3), but it does not seem to be helpful. So any of you guys ever experienced the same problem? Any tips will be appreciated. Thanks in advance.

Config Info:
macOS High Sierra 10.13.4
python version:3.7.0a2
tornado version:4.5.3

1

There are 1 best solutions below

0
On

The class is named CurlAsyncHTTPClient, not Curlasync_HTTPClient. It looks like someone did a search-and-replace for async to async_ because in Python 3.7 async is a reserved word (but it doesn't matter here because it's in the middle of a class name).