当我尝试将1000+列表插入appengine数据存储区时,我会发出此错误RequestTooLargeError: The request to API call datastore_v3.Put() was too large.
试图导入此
from google.appengine.ext.db import RequestTooLargeError
try:
.....
except RequestTooLargeError:
logging.error("RequestTooLargeError")
但获得ImportError: cannot import name RequestTooLargeError
如何在appengine中捕获此RequestTooLargeError
异常?
答案 0 :(得分:4)
该模块有例外:
from google.appengine.runtime.apiproxy_errors import RequestTooLargeError