New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceptions are not helpful #1760
Comments
This is caused by changes here: #1423. With
if the code is changed to an initial @jdemaeyer's workaround except Exception as e:
self.crawling = False
if self.engine is not None:
yield self.engine.close()
raise e traceback makes more sense:
|
There are many ways to trigger this issue; one is to have an exception in start_requests: class Bad(scrapy.Spider):
name = 'bad'
def start_requests(self):
raise Exception('oops') Exceptions in |
iirc the problem with that was that it didn't preserve the traceback at all in Python 2? |
http://bugs.python.org/issue7563 (wontfix for py2) # Example, yielding partial result
try:
result[key] = stuff()
except:
import sys
exc_cls, exc, tb = sys.exc_info()
yield result
raise exc_cls, exc, tb
else:
yield result |
@Digenis thanks for the reference, it was useful. |
See #1759 (comment).
The text was updated successfully, but these errors were encountered: