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

今天遇到一個問題,發佈華爲雲容器的時候,單個文件測試,是能夠的。python

可是在celery中,異步執行時報錯。django

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。app

 

 

 

 

 

最終找到了這種方式 將  eventlet==0.24.1的版本升級到0.26.0異步

 

 

 

 

 

參考:https://ask.csdn.net/questions/1427230socket

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

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

相關文章
相關標籤/搜索