Skip to content
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

Improve unhandled exception handling for Crawler*.crawl() #6047

Open
wRAR opened this issue Sep 13, 2023 · 6 comments
Open

Improve unhandled exception handling for Crawler*.crawl() #6047

wRAR opened this issue Sep 13, 2023 · 6 comments

Comments

@wRAR
Copy link
Member

wRAR commented Sep 13, 2023

As we recently found in #6038, the following well-known snippet from docs and tests:

process = CrawlerProcess()
process.crawl(MySpider)
process.start()

doesn't handle exceptions raised in crawl() correctly, as that method returns a Deferred and we should add an errback to it instead of relying on https://docs.twisted.org/en/latest/core/howto/defer.html#unhandled-errors, either in our code or in examples.

@namansharma18899
Copy link

Hey @wRAR I'm on point with the description.

I think I can work on it so I'll really appreciate if you can assign this issue to me.

Also I had just one doubt, this issue only focuses on adding errbacks in the docs right ??

@wRAR
Copy link
Member Author

wRAR commented Oct 1, 2023

"either in our code or in examples" so no, ideally it should be done in the code.

@wRAR
Copy link
Member Author

wRAR commented Oct 28, 2023

Related (but is about scrapy crawl): #2171

@sa2415
Copy link
Contributor

sa2415 commented Nov 28, 2023

Could I work on this?

@wRAR
Copy link
Member Author

wRAR commented Nov 28, 2023

Sure.

@antarahebbar
Copy link

Hi! @yueric985 and I are students are we are working on a project for a class that requires us to make an open-source contribution to a library. We will be working on this issue as an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants