Rookie Rookie - 1 year ago 142
Python Question

Handle RequestTooLargeError exception in Appengine

When i try to insert 1000+ list into appengine datastore, i gout this error

RequestTooLargeError: The request to API call datastore_v3.Put() was too large.

Tried to import this

from google.appengine.ext.db import RequestTooLargeError
except RequestTooLargeError:

But getting
ImportError: cannot import name RequestTooLargeError

How to catch this
exception in appengine?

Answer Source

The exception is on this module:

from google.appengine.runtime.apiproxy_errors import RequestTooLargeError
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download