Scrapy giving error on start running:AttributeError: 'module' object has no attribute 'Any'
Question: Using a tutorial, started "scrapy crawl dmoz" showing an error. I have
installed Scrapy but don't know how to check whether it is correctly installed
or not. I am using tutorial to use it but got stuck. Trackback is below-

    
    
        Traceback (most recent call last):
        File "/usr/local/bin/scrapy", line 9, in <module>
    load_entry_point('Scrapy==0.24.5', 'console_scripts', 'scrapy')()
        File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 122, in execute
    cmds = _get_commands_dict(settings, inproject)
        File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 46, in _get_commands_dict
    cmds = _get_commands_from_module('scrapy.commands', inproject)
        File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 29, in _get_commands_from_module
    for cmd in _iter_command_classes(module):
        File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 20, in _iter_command_classes
    for module in walk_modules(module_name):
        File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/misc.py", line 68, in walk_modules
    submod = import_module(fullpath)
        File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
        File "/usr/local/lib/python2.7/dist-packages/scrapy/commands/bench.py", line 3, in <module>
    from scrapy.tests.mockserver import MockServer
        File "/usr/local/lib/python2.7/dist-packages/scrapy/tests/mockserver.py", line 6, in <module>
    from twisted.internet import reactor, defer, ssl
        File "/usr/local/lib/python2.7/dist-packages/twisted/internet/ssl.py", line 223, in <module>
    from twisted.internet._sslverify import (
        File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_sslverify.py", line 192, in <module>
    verifyHostname, VerificationError = _selectVerifyImplementation(OpenSSL)
        File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_sslverify.py", line 167, in _selectVerifyImplementation
    from service_identity import VerificationError
        File "/usr/local/lib/python2.7/dist-packages/service_identity/__init__.py", line 12, in <module>
    from . import pyopenssl
        File "/usr/local/lib/python2.7/dist-packages/service_identity/pyopenssl.py", line 12, in <module>
    from pyasn1_modules.rfc2459 import GeneralNames
        File "/usr/local/lib/python2.7/dist-packages/pyasn1_modules/rfc2459.py", line 72, in <module>
    class AttributeValue(univ.Any): pass
        AttributeError: 'module' object has no attribute 'Any'
    


Answer: If you are using `virtualenv`.Try

    
    
    pip install -U pyasn1
    

Otherwise

    
    
    sudo pip install -U pyasn1
    

For more <https://github.com/scrapy/scrapy/issues/783>

