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

scrapy parse doesn't support async callbacks #5424

Closed
wRAR opened this issue Feb 21, 2022 · 2 comments · Fixed by #5577
Closed

scrapy parse doesn't support async callbacks #5424

wRAR opened this issue Feb 21, 2022 · 2 comments · Fixed by #5577

Comments

@wRAR
Copy link
Member

wRAR commented Feb 21, 2022

In master when running scrapy parse for a spider with async def parse the page is downloaded but then the spider hangs. In #4978 it instead raises TypeError: 'async_generator' object is not iterable. Both problems happen because the parse command calls iterate_spider_output and doesn't expect a Deferred or an async iterator.

@GKukulski
Copy link

Hi, I have a problem with using scrapy parse with async function with yield inside.
The 'TypeError: 'async_generator' object is not iterable' is raising.
When i tested deleting 'asnyc' or 'yield' everything is fine...

@Gallaecio
Copy link
Member

Gallaecio commented Jan 31, 2023

Please, if you believe this is a bug (it definitely sounds like it), open a separate ticket about it and provide a minimal, reproducible 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.

3 participants