Twitsted ValueError:Raspian Stretch上的未知ECC曲线

时间:2017-09-21 12:54:04

标签: scrapy twisted raspbian

我想使用我的Raspberry Pi 3,运行Rapian Stretch进行网络报废项目。对于pyhton我使用berryconada分布。 当我运行我的蜘蛛时,我得到了

ValueError: Unknown ECC curve

在我的笔记本电脑上(Xubuntu 16.04)一切正常。也许我需要安装一个额外的库或什么?

低于完整的追溯。

Traceback (most recent call last):
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/python/failure.py", line 393, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/core/downloader/middleware.py", line 43, in process_request
    defer.returnValue((yield download_func(request=request,spider=spider)))
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/utils/defer.py", line 45, in mustbe_deferred
    result = f(*args, **kw)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/core/downloader/handlers/__init__.py", line 65, in download_request
    return handler.download_request(request, spider)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/core/downloader/handlers/http11.py", line 63, in download_request
    return agent.download_request(request)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/core/downloader/handlers/http11.py", line 300, in download_request
    method, to_bytes(url, encoding='ascii'), headers, bodyproducer)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/web/client.py", line 1633, in request
    endpoint = self._getEndpoint(parsedURI)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/web/client.py", line 1617, in _getEndpoint
    return self._endpointFactory.endpointForURI(uri)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/web/client.py", line 1494, in endpointForURI
    uri.port)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/core/downloader/contextfactory.py", line 59, in creatorForNetloc
    return ScrapyClientTLSOptions(hostname.decode("ascii"), self.getContext())
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/core/downloader/contextfactory.py", line 56, in getContext
    return self.getCertificateOptions().getContext()
  File "/home/pi/berryconda3/lib/python3.6/site-packages/scrapy/core/downloader/contextfactory.py", line 51, in getCertificateOptions
    acceptableCiphers=DEFAULT_CIPHERS)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/python/deprecate.py", line 792, in wrapped
    return wrappee(*args, **kwargs)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/internet/_sslverify.py", line 1595, in __init__
    self._ecCurve = _OpenSSLECCurve(_defaultCurveName)
  File "/home/pi/berryconda3/lib/python3.6/site-packages/twisted/internet/_sslverify.py", line 1744, in __init__
    raise ValueError("Unknown ECC curve.")

1 个答案:

答案 0 :(得分:0)

我放弃了raspconda和pip安装了scrapy。如果你在Jessie上遇到这个错误,那么转移到Stretch会让你访问包含遗漏内容的较新的openssl库。

在我升级到Stretch后,我从我的路径切割了berryconda,pip卸载了加密,扭曲,pyopenssl和scrapy。

然后使用no cache选项我pip安装了scrapy,它将所有这些包带回来,现在我的蜘蛛正在运行。