Scrapy python: Issue with running scrapy spider from script: 'module' object has no attribute 'OP_NO_TLSv1_1'

While trying to run a scrapy script the following error was raised:

    File "/Library/Python/2.7/site-packages/Twisted-16.7.0rc1-py2.7-macosx-10.11-
    intel.egg/twisted/internet/_sslverify.py", line 38, in <module>
    TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
    AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

One possible fix is to downgrade to the version of twisted to Twisted==16.4.1.

Command to solve the scrapy error:

pip install Twisted==16.4.1

This issue has been fix on newer versions of scrapy.