Page Name: datastore-queries
Release: 0.10.1
This python code (a close copy of one of the pieces in the tutorials), yields an error:
fromgcloudimportdatastoreds_client=datastore.Client(project='mikes-playground-project')
#key = client.key('Person')##entity = datastore.Entity(key=key)#entity['name'] = 'Your name'#entity['age'] = 25#client.put(entity)#print("And Out..")query=datastore.Query('Person')
query.add_filter('age', '<', '100')
list(query.fetch(1), client=ds_client) #even if you remove client=...results in the following error
> basilyan@instance-3:~$ python ds.py
> Traceback (most recent call last):
> File "ds.py", line 12, in <module>
> query = datastore.Query('Person')
> File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/query.py", line 88, in __init__
> self._project = project or client.project
> AttributeError: 'str' object has no attribute 'project'
Using Python 2.7 and gcloud (0.10.1)
Page Name: datastore-queries
Release: 0.10.1
This python code (a close copy of one of the pieces in the tutorials), yields an error:
results in the following error
Using Python 2.7 and gcloud (0.10.1)