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
String value for order of Scrapy component #2420
Comments
Right, it's probably not stated explicitly nor checked, but the examples given in the docs use integers as far as I can see. |
@redapple Yeah, that's a not too frequent case to worry about, but I found it in our own internal project (it's linked with this issue on above). It's fixed there already, but someone can do the same mistake. |
How about something like
somewhere in I could open a PR with some mention in the docs and some tests if you like this approach. |
@elacuesta Makes sense to me, that would be nice, thanks. In my case I encountered with a string with an integer inside as order, so it should be covered by the similar changes. Btw there's no need to strip value before converting to int, but that's nitpicking :) |
PR created |
If Scrapy component order is defined as a string, it leads to undefined behaviour on Python 2 and to the following errors on Python 3:
My guess that 1) order of a Scrapy component should be stated as of integer type (or
None
) and there should be a check somewhere, 2) or the sorting logic should be fixed.The text was updated successfully, but these errors were encountered: