TypeError
'<' not supported between instances of 'NoneType' and 'int'
Exception on /api/v0/features [GET] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask_cors/extension.py", line 178, in wrapped_function return cors_after_request(app.make_response(f(args, kwargs))) ^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/views.py", line 109, in view return current_app.ensure_sync(self.dispatch_request)(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/views.py", line 190, in dispatch_request return current_app.ensure_sync(meth)(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/framework/basehandlers.py", line 186, in get handler_data = self.do_get(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/api/features_api.py", line 117, in do_get return self.do_search() ^^^^^^^^^^^^^^^^ File "/srv/api/features_api.py", line 98, in do_search features_on_page, total_count = search.process_query( ^^^^^^^^^^^^^^^^^^^^^ File "/srv/internals/search.py", line 386, in process_query total_order_ids = _resolve_promise_to_id_list(total_order_promise) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/internals/search.py", line 279, in _resolve_promise_to_id_list key_or_projection_list = future.get_result() ^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 214, in result self.check_success() File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 161, in check_success raise self._exception File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 334, in _advance_tasklet yielded = self.generator.throw(type(error), error, traceback) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 113, in fetch while (yield results.has_next_async()): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 338, in _advance_tasklet yielded = self.generator.send(send_value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 674, in has_next_async if value < min_value: ^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 771, in lt return self._compare(other) == -1 ^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 827, in _compare if this_value < other_value: ^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: '<' not supported between instances of 'NoneType' and 'int'
My theory is that the is:recently-reviewed query is returning some feature entries that have no value for the date of the review request. Also sorting by reviewed_on actually sorts by review request date.
I'm not sure if this was ever filed. From Daniel:
It looks like this is caused by sorting by "-gate.reviewed_on"
This query fails: https://chromestatus.com/api/v0/features?q=is:recently-reviewed&sort=-gate.reviewed_on
Removing the sort argument from the query string does not fail: https://chromestatus.com/api/v0/features?q=is:recently-reviewed
TypeError '<' not supported between instances of 'NoneType' and 'int' Exception on /api/v0/features [GET] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask_cors/extension.py", line 178, in wrapped_function return cors_after_request(app.make_response(f(args, kwargs))) ^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/views.py", line 109, in view return current_app.ensure_sync(self.dispatch_request)(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/views.py", line 190, in dispatch_request return current_app.ensure_sync(meth)(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/framework/basehandlers.py", line 186, in get handler_data = self.do_get(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/api/features_api.py", line 117, in do_get return self.do_search() ^^^^^^^^^^^^^^^^ File "/srv/api/features_api.py", line 98, in do_search features_on_page, total_count = search.process_query( ^^^^^^^^^^^^^^^^^^^^^ File "/srv/internals/search.py", line 386, in process_query total_order_ids = _resolve_promise_to_id_list(total_order_promise) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/internals/search.py", line 279, in _resolve_promise_to_id_list key_or_projection_list = future.get_result() ^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 214, in result self.check_success() File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 161, in check_success raise self._exception File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 334, in _advance_tasklet yielded = self.generator.throw(type(error), error, traceback) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 113, in fetch while (yield results.has_next_async()): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/tasklets.py", line 338, in _advance_tasklet yielded = self.generator.send(send_value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 674, in has_next_async if value < min_value: ^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 771, in lt return self._compare(other) == -1 ^^^^^^^^^^^^^^^^^^^^ File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/ndb/_datastore_query.py", line 827, in _compare if this_value < other_value: ^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: '<' not supported between instances of 'NoneType' and 'int'
GET https://chromestatus.com/api/v0/features?q=is:recently-reviewed&showEnterprise=&sort=-gate.reviewed_on&num=25 User agent Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Service default Version 1420dc5