You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to test an async callback using Scrapy contracts? Based on the error message, it seems like there's no support for that. It would be great to have this feature, or maybe I'm missing something. Should I even use contracts in such cases, or is there a better alternative?
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ehsan/projects/upwork/karim/maryland-scraper/.venv/lib/python3.12/site-packages/scrapy/contracts/__init__.py", line 183, in cb_wrapper
output = cb(response, **cb_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ehsan/projects/upwork/karim/maryland-scraper/.venv/lib/python3.12/site-packages/scrapy/contracts/__init__.py", line 70, in wrapper
raise TypeError("Contracts don't support async callbacks")
TypeError: Contracts don't support async callbacks
The text was updated successfully, but these errors were encountered:
As you can see from the traceback, the lack of support for async callbacks comes from upstream Scrapy. I'd suggest to open an issue in Scrapy itself if you'd like to start a conversation about it.
Is there a way to test an async callback using Scrapy contracts? Based on the error message, it seems like there's no support for that. It would be great to have this feature, or maybe I'm missing something. Should I even use contracts in such cases, or is there a better alternative?
The text was updated successfully, but these errors were encountered: