After installing Scrapy, start the first step to create the Scrapy project, then prompt a userwarning: Prompt me service_identity not installed, I through PIP install service_identity after installation, Re-creating a scrapy Crawler project has the following error hints.
Traceback (most recent): File "/usr/local/bin/scrapy", line 4, Inexecute () file "/usr/local/lib/python2.7/ dist-packages/scrapy/cmdline.py ", line 122, in Executecmds = Get_commands_dict (settings, inproject) File"/usr/local/ lib/python2.7/dist-packages/scrapy/cmdline.py ", line +, in Get_commands_dictcmds = _get_commands_from_module (' Scrapy.commands ', inproject) File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line, in _get_ Commands_from_modulefor cmd in _iter_command_classes (module): File "/usr/local/lib/python2.7/dist-packages/scrapy/ cmdline.py ", line A, in _iter_command_classesfor module in Walk_modules (module_name): File"/usr/local/lib/python2.7/ dist-packages/scrapy/utils/misc.py ", line. Walk_modulessubmod = Import_module (fullpath) File"/usr/lib/python2.7 /importlib/__init.py ", line Notoginseng, in Import_moduleimport (name) File"/usr/local/lib/python2.7/dist-packages/scrapy/ commands/bench.py ", line 3, infrom scrapy.tests.mockserver import Mockserverfile"/usr/local/lib/python2.7/dist-packages/scrapy/tests/mockserver.py ", line 6, Infrom twisted.internet Import reactor, defer, Sslfile "/usr/local/lib/python2.7/dist-packages/twisted/internet/ssl.py", line 223, Infrom Twisted.internet.sslverify Import (File "/usr/local/lib/python2.7/dist-packages/twisted/internet/sslverify.py", Line 184, inverifyhostname, Verificationerror = _selectverifyimplementation () File "/usr/local/lib/python2.7/ dist-packages/twisted/internet/_sslverify.py ", line 159, in _selectverifyimplementationfrom service_identity import Verificationerrorfile "/usr/local/lib/python2.7/dist-packages/service_identity/__init.py", line one, Infrom. Import Pyopensslfile "/usr/local/lib/python2.7/dist-packages/service_identity/pyopenssl.py", line, Infrom pyasn1_ modules.rfc2459 import Generalnamesfile "/usr/local/lib/python2.7/dist-packages/pyasn1_modules/rfc2459.py", line 72 , Inclass AttributeValue (Univ. Any): Passattributeerror: ' Module ' object have no attribute ' any '
The reason is PyASN1 this package version is too low to cause, through Easy_install reinstall this package. The PYASN1 package I installed is 0.1.7, and the Service_identity package is 14.0.0.
Service_identity module Attributeerror: ' Module ' object have no attribute ' any '