ChinesePeople
ChinesePeople

Reputation: 1

Why is the pyspider module failing with"'collections' has no attribute 'MutableMapping'"?

After Pycharm installs pyspider,enter "pyspider all" on command,and an error is reported. C:

C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pyspider\libs\utils.py:196: FutureWarning: timeout is not supported on your platform.
  warnings.warn("timeout is not supported on your platform.", FutureWarning)                                                                                  
[I 220529 09:16:16 result_worker:49] result_worker starting...
Exception in thread Thread-4 (invoke):
Traceback (most recent call last):    
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pyspider\run.py", line 236, in fetcher
    Fetcher = load_cls(None, None, fetcher_cls)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pyspider\run.py", line 48, in load_cls
    return utils.load_object(value)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pyspider\libs\utils.py", line 369, in load_object
    module = __import__(module_name, globals(), locals(), [object_name])
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pyspider\fetcher\__init__.py", line 1, in <module>
    from .tornado_fetcher import Fetcher
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pyspider\fetcher\tornado_fetcher.py", line 21, in <module>
    import tornado.httputil
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\tornado\httputil.py", line 106, in <module>
    class HTTPHeaders(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

How to solve this situation?

Upvotes: 0

Views: 138

Answers (0)

Related Questions