Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.
This repository was archived by the owner on May 6, 2026. It is now read-only.

Error when querying repeated structured property #254

Description

@jacobg

Here is error output.

 @utils.positional(2)
def fetch_page_async(self, page_size, **kwargs):
"""Fetch a page of results.
This is the asynchronous version of :meth:`Query.fetch_page`.
Returns:
tasklets.Future: See :meth:`Query.fetch_page` for eventual result.
"""
# Avoid circular import in Python 2.7
from google.cloud.ndb import _datastore_query
_options = kwargs["_options"]
if _options.filters and _options.filters._multiquery:
raise TypeError(
"Can't use 'fetch_page' or 'fetch_page_async' with query that "
"uses 'OR', '!=', or 'IN'."
)
iterator = _datastore_query.iterate(_options, raw=True)
results = []
cursor = None
while (yield iterator.has_next_async()):
result = iterator.next()
results.append(result.entity())
cursor = result.cursor
more = results and (
> iterator._more_results_after_limit or iterator.probably_has_next()
)
E AttributeError: '_PostFilterQueryIteratorImpl' object has no attribute '_more_results_after_limit'

It occurs when querying for multiple properties in the StructuredProperty. I think it's equivalent to an OR query, which is not supported.

Querying for only one property in a StrucuturedProperty works fine.

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions