Igor's Blog
Programming, DIY, Games, Hacks, and Tech

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...

Recent Blog Posts

How to enable the full stack trace in Maven's Surefire plugin for JUnit testing

Twelve elements of the Burst Mining Pool interface explained

TPG FTTB settings for the Billion BiPAC 8700AXL 1600 modem router

Protecting old Atari Lynx game boxes with snug fit plastic sleeves

How to fix SoapUI javax.net.ssl.SSLHandshakeException calling WebLogic 12.2 web services on Java 8

Woolworths (WOW) shares disappeared from Computer Share Investor Centre

Connecting the Dell UltraSharp U3415W monitor to a MacBookPro via USB-C

How to add/change PHP versions appearing in MAMP preferences

Fix the ORA-00904: ORA_ROWSCN: invalid identifier error in SQLDeveloper with a few easy steps

G Suite Gmail is broken on Safari due to new Google Content Security Policy settings

Recent Galleries

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

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
300 George St Blogumentary

My Online Tools

UUID to OID Converter
Guru JSON-RPC Tester
Extrudifier Object Designer
Travel ┬ÁBlog

Blogs and Friends

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

Blog Activity

Blog Activity
Don't forget to
my Facebook page for more great articles!
Don't show this again