Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I ran into a problem with the Google Apps local dev server where my DataStore became corrupted. This happened around the time that I was modifying some of my code to be more efficient by offloading some processing to the DataStore via GQL. Unfortunately I didn't fully read the limitations of the DataStore GQL and wrote a statement that was not supported, which caused a DataStore corruption.

This is the kind of error I was getting from the dev server:
 Dev server error
EventError: could not determine a constructor for the tag '!'
in "<string>", line 38, column 11:
- name: !
^


I tracked this down to a GQL statement like this:
 GQL
SELECT * FROM MyEntity WHERE open != true ORDER BY date ASC


The problem was with the != operator. It's not supported!



From the GQL reference...
Python GQL supports operators != and OR. Those operators are not yet supported by Datastore GQL.


Doh! Oh well. That explained some of the problem, but what went wrong, but how to fix it? Well the reason why the DataStore became corrupted was this (source)...
The development web server (dev_appserver.py) automatically adds items to this file when the application tries to execute a query that needs an index that does not have an appropriate entry in the configuration file.


Apparently the dev server doesn't really check what it's indexing, it just blindly tries to create an index. So the index.yaml file in my case got the following entry:
 index.yaml
- kind: MyEntity
properties:
- name: !
- name: open
direction: desc


The entry "name: !" is not valid, so the DataStore dies. Fixing it is easy, just remove the invalid name entry, and restart the dev server. Easy!

-i

Please leave your comments or feedback below!
comments powered by Disqus
Other posts you may like...
Hi! You can search my blog here ⤵
Or browse the recent top tags...

Recent Blog Posts

How to stop macOS adding shadows to window screenshots

How to run Atari Lynx games on the SNES Classic Mini

Maven dependency scopes with relation to WAR file packaging and the WEB-INF/lib directory

Hacking the Sonoff B1 WiFi LED bulb to run custom firmware

What does an idle WebLogic server run on the hour to cause a CPU spike

How to open the Sonoff B1 wifi LED bulb to access its internal circuitry

Australian release SNES mini classic unboxing and a quick play through

Troubleshooting high CPU usage for JVM threads

How to fix WebLogic high CPU usage due to a corrupted file store

Mini review of the Sonoff B1 WiFi light bulb

Recent Galleries

Atari Lynx repair - Part 5 - McWill LED screen mod installation

Atari Lynx repair - Part 4 - screen cover replacement

Atari Lynx repair - Part 2 - re-capping the motherboard

Atari Lynx repair - Part 3 - broken speaker replacement

Atari Lynx repair - Part 1 - introduction and case disassembly

Building a custom Atari Lynx game box storage shelf unit in a day

Protecting old Atari Lynx game boxes with snug fit plastic sleeves

Monument Valley 2 is released and does not disappoint

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

Blogs and Friends

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity