Python 2.7 has reached end of support
and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of Python.
Stay organized with collections
Save and categorize content based on your preferences.
google.appengine.api.datastore_errors module
Summary
Errors used in the Python datastore API.
Contents
- exception google.appengine.api.datastore_errors.CommittedButStillApplyingsource
-
Bases: google.appengine.api.datastore_errors.Timeout
The write or transaction was committed, but some entities or index rows
may not have been fully updated. Those updates should automatically be
applied soon. You can roll them forward immediately by reading one of the
entities inside a transaction.
- exception google.appengine.api.datastore_errors.Errorsource
-
Bases: exceptions.Exception
Base datastore error type.
- exception google.appengine.api.datastore_errors.NeedIndexError(error, original_message=None, header=None, yaml_index=None, xml_index=None)source
-
Bases: google.appengine.api.datastore_errors.Error
No matching index was found for a query that requires an index. Check
the Indexes page in the Admin Console and your index.yaml file.
- exception google.appengine.api.datastore_errors.QueryNotFoundErrorsource
-
Bases: google.appengine.api.datastore_errors.Error
DEPRECATED: Raised by Iterator methods when the Iterator is invalid. This
should not happen during normal usage; it protects against malicious users
and system errors.
- exception google.appengine.api.datastore_errors.Rollbacksource
-
Bases: google.appengine.api.datastore_errors.Error
May be raised by transaction functions when they want to roll back
instead of committing. Note that any exception raised by a transaction
function will cause a rollback. This is purely for convenience. See
datastore.RunInTransaction for details.
- exception google.appengine.api.datastore_errors.Timeoutsource
-
Bases: google.appengine.api.datastore_errors.Error
The datastore operation timed out, or the data was temporarily
unavailable. This can happen when you attempt to put, get, or delete too
many entities or an entity with too many properties, or if the datastore is
overloaded or having trouble.
- exception google.appengine.api.datastore_errors.TransactionFailedErrorsource
-
Bases: google.appengine.api.datastore_errors.Error
Raised by RunInTransaction methods when the transaction could not be
committed, even after retrying. This is usually due to high contention.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThis module defines the various error types that can be raised by the Python datastore API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBadArgumentError\u003c/code\u003e, \u003ccode\u003eBadFilterError\u003c/code\u003e, \u003ccode\u003eBadKeyError\u003c/code\u003e, \u003ccode\u003eBadPropertyError\u003c/code\u003e, \u003ccode\u003eBadQueryError\u003c/code\u003e, \u003ccode\u003eBadRequestError\u003c/code\u003e, and \u003ccode\u003eBadValueError\u003c/code\u003e are raised when invalid arguments, filters, keys, property names, queries, parameters, or values are encountered respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCommittedButStillApplying\u003c/code\u003e indicates a committed write or transaction that is still in the process of updating entities or index rows.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eNeedIndexError\u003c/code\u003e signifies that a required index for a query is missing, prompting a review of the Admin Console and \u003ccode\u003eindex.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTimeout\u003c/code\u003e indicates a datastore operation failed due to either a timeout, too many properties, too many entities or a temporary lack of data availability.\u003c/p\u003e\n"]]],[],null,["# google.appengine.api.datastore_errors module\n============================================\n\nSummary\n-------\n\nErrors used in the Python datastore API.\n\nContents\n--------\n\n*exception* google.appengine.api.datastore_errors.BadArgumentError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#BadArgumentError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n Raised by Query.Order(), Iterator.Next(), and others when they're\npassed an invalid argument. \n\n*exception* google.appengine.api.datastore_errors.BadFilterError(filter)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#BadFilterError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n Raised by Query.__setitem__() and Query.Run() when a filter string is\ninvalid. \n\n*exception* google.appengine.api.datastore_errors.BadKeyError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#BadKeyError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\nRaised by Key.__str__ when the key is invalid. \n\n*exception* google.appengine.api.datastore_errors.BadPropertyError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#BadPropertyError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\nRaised by Entity.__setitem__() when a property name isn't a string. \n\n*exception* google.appengine.api.datastore_errors.BadQueryError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#BadQueryError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\nRaised by Query when a query or query string is invalid. \n\n*exception* google.appengine.api.datastore_errors.BadRequestError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#BadRequestError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\nRaised by datastore calls when the parameter(s) are invalid. \n\n*exception* google.appengine.api.datastore_errors.BadValueError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#BadValueError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n Raised by Entity.__setitem__(), Query.__setitem__(), Get(), and others\nwhen a property value or filter value is invalid. \n\n*exception* google.appengine.api.datastore_errors.CommittedButStillApplying[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#CommittedButStillApplying)\n\n: Bases: [google.appengine.api.datastore_errors.Timeout](#google.appengine.api.datastore_errors.Timeout)\n\n The write or transaction was committed, but some entities or index rows\n may not have been fully updated. Those updates should automatically be\n applied soon. You can roll them forward immediately by reading one of the\nentities inside a transaction. \n\n*exception* google.appengine.api.datastore_errors.EntityNotFoundError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#EntityNotFoundError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\nDEPRECATED: Raised by Get() when the requested entity is not found. \n\n*exception* google.appengine.api.datastore_errors.Error[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#Error)\n\n: Bases: exceptions.Exception\n\nBase datastore error type. \n\n*exception* google.appengine.api.datastore_errors.InternalError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#InternalError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\nAn internal datastore error. Please report this to Google. \n\n*exception* google.appengine.api.datastore_errors.NeedIndexError(error, original_message=None, header=None, yaml_index=None, xml_index=None)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#NeedIndexError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n No matching index was found for a query that requires an index. Check\n the Indexes page in the Admin Console and your index.yaml file. \n\n Header()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#NeedIndexError.Header)\n : \n\n OriginalMessage()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#NeedIndexError.OriginalMessage)\n : \n\n XmlIndex()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#NeedIndexError.XmlIndex)\n : \n\n YamlIndex()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#NeedIndexError.YamlIndex)\n: \n\n*exception* google.appengine.api.datastore_errors.QueryNotFoundError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#QueryNotFoundError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n DEPRECATED: Raised by Iterator methods when the Iterator is invalid. This\n should not happen during normal usage; it protects against malicious users\nand system errors. \n\n*exception* google.appengine.api.datastore_errors.ReferencePropertyResolveError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#ReferencePropertyResolveError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\nAn error occurred while trying to resolve a ReferenceProperty. \n\n*exception* google.appengine.api.datastore_errors.Rollback[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#Rollback)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n May be raised by transaction functions when they want to roll back\n instead of committing. Note that any exception raised by a transaction\n function will cause a rollback. This is purely for convenience. See\ndatastore.RunInTransaction for details. \n\n*exception* google.appengine.api.datastore_errors.Timeout[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#Timeout)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n The datastore operation timed out, or the data was temporarily\n unavailable. This can happen when you attempt to put, get, or delete too\n many entities or an entity with too many properties, or if the datastore is\noverloaded or having trouble. \n\n*exception* google.appengine.api.datastore_errors.TransactionFailedError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#TransactionFailedError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n Raised by RunInTransaction methods when the transaction could not be\ncommitted, even after retrying. This is usually due to high contention. \n\n*exception* google.appengine.api.datastore_errors.TransactionNotFoundError[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/api/datastore_errors#TransactionNotFoundError)\n\n: Bases: [google.appengine.api.datastore_errors.Error](#google.appengine.api.datastore_errors.Error)\n\n DEPRECATED: Raised by RunInTransaction. This is an internal error; you\n should not see this."]]