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

Exception "Keys only queries do not support IN filters." #4

Open
alex-kowalczyk opened this issue May 10, 2014 · 1 comment
Open

Exception "Keys only queries do not support IN filters." #4

alex-kowalczyk opened this issue May 10, 2014 · 1 comment

Comments

@alex-kowalczyk
Copy link

The pipeline filter is

'filters': [("due_date", "<", due_date_before),
                                ("due_date", ">", None),
                                ("status", "IN", ['planned', 'working'])]

The result of pipeline with input reader set to 'mapreduce_utils.DatastoreQueryInputReader' is an exception below.

Would you have any suggestions for a quick workaround?

ERROR    2014-05-10 08:09:58,929 webapp2.py:1552] Keys only queries do not support IN filters.
Traceback (most recent call last):
  File "/home/alex/Documents/src/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/home/alex/Documents/src/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/home/alex/Documents/src/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/home/alex/Documents/src/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/home/alex/Documents/src/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/home/alex/Documents/src/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/home/alex/Documents/src/offiserv/vendor/mapreduce/base_handler.py", line 126, in post
    self.handle()
  File "/home/alex/Documents/src/offiserv/vendor/mapreduce/handlers.py", line 1273, in handle
    readers, serialized_readers_entity = self._get_input_readers(state)
  File "/home/alex/Documents/src/offiserv/vendor/mapreduce/handlers.py", line 1323, in _get_input_readers
    state.mapreduce_spec.mapper)
  File "/home/alex/Documents/src/offiserv/vendor/mapreduce_utils/mapreduce_utils.py", line 213, in split_input
    entity_kind, keys_only=True, filters=filters)
  File "/home/alex/Documents/src/offiserv/vendor/mapreduce_utils/mapreduce_utils.py", line 55, in make_ascending_query
    order=['__key__'])
  File "/home/alex/Documents/src/offiserv/vendor/mapreduce_utils/mapreduce_utils.py", line 44, in make_query
    query = self.filter_query(query, filters=filters)
  File "/home/alex/Documents/src/offiserv/vendor/mapreduce_utils/mapreduce_utils.py", line 66, in filter_query
    query.filter("%s %s" % (k, c), v)
  File "/home/alex/Documents/src/google_appengine/google/appengine/ext/db/__init__.py", line 2576, in filter
    raise BadQueryError('Keys only queries do not support IN filters.')
BadQueryError: Keys only queries do not support IN filters.
@lukmdo
Copy link
Owner

lukmdo commented May 20, 2014

Hi @alex-offiserv - I haven't fallowd recent changes in GAE API + this project was not getting any updates for long...

I will have a look before the end of week - sorry for delay and thanks for raising issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants