Fork me on GitHub

GreenSSLSocket does not have a public constructor. Instances are returned by SSLContext.wrap_socket(). python3.7

今天遇到一个问题,发布华为云容器的时候,单个文件测试,是可以的。

但是在celery中,异步执行时报错。

ventlet\green\ssl.py", line 392, in wrap_socket
    return GreenSSLSocket(sock, *a, _context=self, **kw)
  File "c:\users\cango\envs\py3django\lib\site-packages\eventlet\green\ssl.py", line 64, in __init__
    ca_certs, do_handshake_on_connect and six.PY2, *args, **kw)
  File "c:\users\cango\appdata\local\programs\python\python37\lib\ssl.py", line 808, in __init__
    f"{self.__class__.__name__} does not have a public "
TypeError: GreenSSLSocket does not have a public constructor. Instances are returned by SSLContext.wrap_socket().

worker: Hitting Ctrl+C again will terminate all running tasks!

 

 

 

 

 

 搜了半天,有的解决方法是 把python的环境的3.7换成3.6。

 

 

 

 

 

最终找到了这种方式 将  eventlet==0.24.1的版本升级到0.26.0

 

 

 

 

 

参考:https://ask.csdn.net/questions/1427230

https://www.it610.com/article/1292600447600762880.htm

https://ask.csdn.net/questions/1427264

posted @ 2020-12-04 18:49  神雕爱大侠  阅读(517)  评论(0编辑  收藏  举报