Apify Discord Mirror

Updated 5 months ago

Scrapy scraper immediately stopped working !!

At a glance

The community member is experiencing an issue with their Python, Scrapy, and Apify scrapers, where they are receiving an "AttributeError: 'AsyncioSelectorReactor' object has no attribute '_handleSignals'" error when creating a new build, but the previous build runs fine. Another community member suggests that this is due to a recent update to the Twisted library, which is a Scrapy requirement. The solution provided is to add the constraint Twisted < 23.0.0 to the requirements.txt file of the project. The community member confirms that this solution worked.

Useful resources
Hi, I am writing scraper's in Python, Scrapy and Apify. I have multiple actors that were working great till last night but suddenly today when I create a new build and start to run they give error "AttributeError: 'AsyncioSelectorReactor' object has no attribute '_handleSignals'".
This is same for all the scrapers if I just run the previous build they run fine.
How can I fix this?
V
M
3 comments
Hi ,

it turns out to be a problem related to the new release of the Twisted library from yesterday (https://github.com/twisted/twisted/releases/tag/twisted-23.8.0), which is a Scrapy requirement.

As a hotfix, you can add the following constraint to the requirements.txt of your Actor project:
Plain Text
Twisted < 23.0.0
Thanks it worked.
Great, you're welcome. Also, we already updated the template (https://github.com/apify/actor-templates/pull/179).
Add a reply
Sign up and join the conversation on Discord