I’m using Google App Engine with NDB. I’ve removed a lot of code for brevity, but kept the basic problem. I’m getting an error 'list' object has no attribute 'get_result'
def get_future(keys):
future = ndb.get_multi_async(keys)
important_value = ... # get important value
return {"future" : future, "value" : important_value}
dic = get_future(keys)
future = dic['future']
# error `'list' object has no attribute 'get_result'`
items = future.get_result()
Why am I getting a list back when I should be getting a future?
get_multi_asyncactually returns a list offutureobjects, so you would need to call.get_result()on those objects.Official definition: