2015-07-02 5 views
0

Я написал класс паука для обхода через eventbrite.com и получения данных о событиях в области Urbana Champaign. Однако я получил эту ошибку. Не могли бы вы сказать мне, в чем ошибка? Я новичок в scrapy, поэтому размещаю это здесь. Можете ли вы также рассказать мне, как исправить эту ошибку?Scrapy script не работает для извлечения событий из eventbrite.com

scrapy crawl eventbrite 
2015-07-02 17:08:38 [scrapy] INFO: Scrapy 1.0.1 started (bot: tutorial) 
2015-07-02 17:08:38 [scrapy] INFO: Optional features available: ssl, http11 
2015-07-02 17:08:38 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'tutorial.spiders', 'SPIDER_MODULES': ['tutorial.spiders'], 'BOT_NAME': 'tutorial'} 
2015-07-02 17:08:38 [py.warnings] WARNING: :0: UserWarning: You do not have a working installation of the service_identity module: 'No module named service_identity'. Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied. Without the service_identity module and a recent enough pyOpenSSL to support it, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected. 

2015-07-02 17:08:38 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, LogStats, CoreStats, SpiderState 
2015-07-02 17:08:38 [scrapy] INFO: Enabled downloader middlewares: HttpAuthMiddleware, DownloadTimeoutMiddleware, UserAgentMiddleware, RetryMiddleware, DefaultHeadersMiddleware, MetaRefreshMiddleware, HttpCompressionMiddleware, RedirectMiddleware, CookiesMiddleware, ChunkedTransferMiddleware, DownloaderStats 
2015-07-02 17:08:38 [scrapy] INFO: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, RefererMiddleware, UrlLengthMiddleware, DepthMiddleware 
2015-07-02 17:08:38 [scrapy] INFO: Enabled item pipelines: 
2015-07-02 17:08:38 [scrapy] INFO: Spider opened 
2015-07-02 17:08:38 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min) 
2015-07-02 17:08:38 [scrapy] DEBUG: Telnet console listening on 127.0.0.1:6023 
Error during info_callback 
Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 415, in dataReceived 
    self._write(bytes) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 554, in _write 
    sent = self._tlsConnection.send(toSend) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1270, in send 
    result = _lib.SSL_write(self._ssl, buf, len(buf)) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 926, in wrapper 
    callback(Connection._reverse_mapping[ssl], where, return_code) 
--- <exception caught here> --- 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1055, in infoCallback 
    return wrapped(connection, where, ret) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1157, in _identityVerifyingInfoCallback 
    transport = connection.get_app_data() 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1589, in get_app_data 
    return self._app_data 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1148, in __getattr__ 
    return getattr(self._socket, name) 
exceptions.AttributeError: 'NoneType' object has no attribute '_app_data' 

2015-07-02 17:08:49 [twisted] CRITICAL: Error during info_callback 
Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 415, in dataReceived 
    self._write(bytes) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 554, in _write 
    sent = self._tlsConnection.send(toSend) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1270, in send 
    result = _lib.SSL_write(self._ssl, buf, len(buf)) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 926, in wrapper 
    callback(Connection._reverse_mapping[ssl], where, return_code) 
--- <exception caught here> --- 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1055, in infoCallback 
    return wrapped(connection, where, ret) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1157, in _identityVerifyingInfoCallback 
    transport = connection.get_app_data() 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1589, in get_app_data 
    return self._app_data 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1148, in __getattr__ 
    return getattr(self._socket, name) 
exceptions.AttributeError: 'NoneType' object has no attribute '_app_data' 

From cffi callback <function infoCallback at 0x106e78a28>: 
Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 926, in wrapper 
    callback(Connection._reverse_mapping[ssl], where, return_code) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1059, in infoCallback 
    connection.get_app_data().failVerification(f) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1589, in get_app_data 
    return self._app_data 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1148, in __getattr__ 
    return getattr(self._socket, name) 
AttributeError: 'NoneType' object has no attribute '_app_data' 
Error during info_callback 
Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 415, in dataReceived 
    self._write(bytes) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 554, in _write 
    sent = self._tlsConnection.send(toSend) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1270, in send 
    result = _lib.SSL_write(self._ssl, buf, len(buf)) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 926, in wrapper 
    callback(Connection._reverse_mapping[ssl], where, return_code) 
--- <exception caught here> --- 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1055, in infoCallback 
    return wrapped(connection, where, ret) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1157, in _identityVerifyingInfoCallback 
    transport = connection.get_app_data() 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1589, in get_app_data 
    return self._app_data 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1148, in __getattr__ 
    return getattr(self._socket, name) 
exceptions.AttributeError: 'NoneType' object has no attribute '_app_data' 

2015-07-02 17:08:49 [twisted] CRITICAL: Error during info_callback 
Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 415, in dataReceived 
    self._write(bytes) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/tls.py", line 554, in _write 
    sent = self._tlsConnection.send(toSend) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1270, in send 
    result = _lib.SSL_write(self._ssl, buf, len(buf)) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 926, in wrapper 
    callback(Connection._reverse_mapping[ssl], where, return_code) 
--- <exception caught here> --- 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1055, in infoCallback 
    return wrapped(connection, where, ret) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1157, in _identityVerifyingInfoCallback 
    transport = connection.get_app_data() 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1589, in get_app_data 
    return self._app_data 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1148, in __getattr__ 
    return getattr(self._socket, name) 
exceptions.AttributeError: 'NoneType' object has no attribute '_app_data' 

From cffi callback <function infoCallback at 0x103b1c9b0>: 
Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 926, in wrapper 
    callback(Connection._reverse_mapping[ssl], where, return_code) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1059, in infoCallback 
    connection.get_app_data().failVerification(f) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1589, in get_app_data 
    return self._app_data 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1148, in __getattr__ 
    return getattr(self._socket, name) 
AttributeError: 'NoneType' object has no attribute '_app_data' 
2015-07-02 17:08:51 [scrapy] DEBUG: Crawled (200) <GET https://www.eventbrite.com/d/il--urbana/events/?crt=regular&sort=date> (referer: None) 
2015-07-02 17:08:51 [scrapy] DEBUG: Crawled (200) <GET https://www.eventbrite.com/d/il--champaign/events/?crt=regular&sort=date> (referer: None) 
2015-07-02 17:08:51 [scrapy] INFO: Closing spider (finished) 
2015-07-02 17:08:51 [scrapy] INFO: Dumping Scrapy stats: 
{'downloader/request_bytes': 519, 
'downloader/request_count': 2, 
'downloader/request_method_count/GET': 2, 
'downloader/response_bytes': 55279, 
'downloader/response_count': 2, 
'downloader/response_status_count/200': 2, 
'finish_reason': 'finished', 
'finish_time': datetime.datetime(2015, 7, 2, 11, 38, 51, 775192), 
'log_count/CRITICAL': 2, 
'log_count/DEBUG': 3, 
'log_count/INFO': 7, 
'log_count/WARNING': 1, 
'response_received_count': 2, 
'scheduler/dequeued': 2, 
'scheduler/dequeued/memory': 2, 
'scheduler/enqueued': 2, 
'scheduler/enqueued/memory': 2, 
'start_time': datetime.datetime(2015, 7, 2, 11, 38, 38, 972701)} 
2015-07-02 17:08:51 [scrapy] INFO: Spider closed (finished) 

ответ