Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

后端 未结 20 1610
無奈伤痛
無奈伤痛 2020-11-29 02:06

A Python script of mine is failing with:

Traceback (most recent call last):
  File \"./inspect_sheet.py\", line 21, in 
    main()
  File \"./i         


        
20条回答
  •  情歌与酒
    2020-11-29 02:39

    I experienced the same issue recently and after few hours investigation, I found out that it was caused by New cryptography 2.0 upgrade. This upgrade will break many packages using pyopenssl (like Sentry, Google Analytics and etc). Just downgrade it to 1.9 will solve the problem.

    Be cautious if you are using "pip install -U", it will automatically upgrade packages that are not listed in requirements.txt.

提交回复
热议问题