[Solved] <twisted.python.failure.Failure OpenSSL.SSL.Error: [(‘SSL routines’, ”, ‘wrong signature type’)]

I don’t know why the code reports SSL error recently, but I still can’t find a solution after looking for a tutorial for a long time. When I use scrapy to access the link: https://www.oupiin.com/en/searchpro.html?sKey=G & amp ;page=4,

will report an error, [<
twisted.python.failure.Failure OpenSSL.SSL.Error: [(‘SSL routines’, ”, ‘wrong signature type’)]>]

When I use Anconda’s base environment, it is normal to use scrapy to initiate a request

Switch back to the base environment in git bash with the following command (use conda activate base under cmd)

source activate base 

The result is normal again, and later I found out that the python version of the base environment is 3.8.5, and the command I used when creating the virtual environment is

conda create -n scrapy_ python==3.8

Check the Python version of the virtual environment, 3.8.13

I try to create a virtual environment again

use

conda create -n scrapy_1 python=3.8.5

After creating a new virtual environment and executing the code again, it is normal

Summary: It may be caused by the incompatibility between the pyOpenSSL version and the python version. After changing the python version to 3.8.5, the problem will be solved. If it still doesn’t work, install it

pip uninstall cryptography
pip install cryptography==36.0.2