gpt4 book ai didi

python - 在 Python 3 中使用 Scrapy 时出现扭曲的导入错误

转载 作者:行者123 更新时间:2023-12-04 18:54:57 25 4
gpt4 key购买 nike

尝试在 Python 3 中使用 Scrapy 时出现以下错误。
我正在使用 Ubuntu 16.04 并安装 python3-twisted没有解决问题。

  File "/home/fran/.local/lib/python3.5/site-packages/scrapy/crawler.py", line 150, in crawl
crawler = self._create_crawler(crawler_or_spidercls)
File "/home/fran/.local/lib/python3.5/site-packages/scrapy/crawler.py", line 166, in _create_crawler
return Crawler(spidercls, self.settings)
File "/home/fran/.local/lib/python3.5/site-packages/scrapy/crawler.py", line 46, in __init__
self.extensions = ExtensionManager.from_crawler(self)
File "/home/fran/.local/lib/python3.5/site-packages/scrapy/middleware.py", line 56, in from_crawler
return cls.from_settings(crawler.settings, crawler)
File "/home/fran/.local/lib/python3.5/site-packages/scrapy/middleware.py", line 32, in from_settings
mwcls = load_object(clspath)
File "/home/fran/.local/lib/python3.5/site-packages/scrapy/utils/misc.py", line 44, in load_object
mod = import_module(module)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/fran/.local/lib/python3.5/site-packages/scrapy/extensions/memusage.py", line 16, in <module>
from scrapy.mail import MailSender
File "/home/fran/.local/lib/python3.5/site-packages/scrapy/mail.py", line 23, in <module>
from twisted.mail.smtp import ESMTPSenderFactory
ImportError: No module named 'twisted.mail.smtp'

最佳答案

Scrapy 的 Python 3 支持仍处于 beta 阶段(根据 release notes)

Sending emails is not supported



所以你不可能做任何事情来解决这个问题。

关于python - 在 Python 3 中使用 Scrapy 时出现扭曲的导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37908806/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com