为什么pyspider模块会随着&quot" collections;没有属性' mutableMapping';

发布于 2025-02-02 11:06:19 字数 2338 浏览 2 评论 0原文

pycharm安装pyspider后,在命令上输入“ pyspider all”,并报告了错误。 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'

如何解决这种情况?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文