question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError: For an array_value, subvalues must either all be indexed or all excluded from indexes.

See original GitHub issue

Getting ValueError: For an array_value, subvalues must either all be indexed or all excluded from indexes. error when querying entities with empty arrays.

Edit: I tried getting around this with projection queries where possible but I need to modify the entities after fetching them, which you can’t do with the results of a projection query. So this is a pretty big issue as there is no way around it.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:21 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
alercunhacommented, Oct 19, 2017

I’ve forked the project just to do merge from upstream/master to the PR branch that contains this fix. You can clone my branch and install it manually if you like.

So you would have to do:

$ git clone https://github.com/alercunha/google-cloud-python/
$ cd google-cloud-python
$ git checkout datastore-issue-3152
$ cd datastore && python setup.py install
0reactions
yahyamortassimcommented, Mar 5, 2019

Still having this error with google-cloud-datastore==1.7.3 when trying to query a key that has the format: [{"key1":"","key2":"value2","key3":[]}] via

query = datastore_client.query(kind='KIND')
query.add_filter('name', '=', 'EXAMPLE')
res = list(query.fetch())
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I exclude an Array field from indexes in Google ...
To exclude an Array type property from indexes, each element within the array must have excludeFromIndexes set to true .
Read more >
google.cloud.datastore.helpers — ndb documentation
1: raise ValueError( "For an array_value, subvalues must either " "all be ... Add index information to protobuf. if name in entity.exclude_from_indexes: if ......
Read more >
ValueError if using all scalar values, you must pass an index
While creating data frames you might encounter an error “Valueerror if using all scalar values, you must pass an index.” We will look...
Read more >
1.3.6. /db/_find — Apache CouchDB® 3.2 Documentation
The $all operator matches an array value if it contains all the elements of the argument array. Below is an example used with...
Read more >
NumPy: Array Object - Exercises, Practice, Solution
Write a NumPy program to test whether all elements in an array evaluate to ... Index of a maximum element in a NumPy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found