Ben Wong Ben Wong - 1 year ago 82
Python Question

Google App Engine Error:ERROR 2016-08-27 17:41:18,545] __init__() got an unexpected keyword argument 'require'

I'm doing a tutorial on Google App Engine and I"m getting this error:

ERROR 2016-08-27 17:41:18,545] init() got an unexpected keyword argument 'require'

And I don't know what it's asking for or what it means. Please advise. Thanks.

This happens when I call:


json_response = Users.add_new_user(name, email, password)


class Users(db.Model):
name = db.StringProperty(required = True)
email = db.StringProperty(required = True)
password = db.StringProperty(require = True)
confirmation_code = db.StringProperty(required = True)
confirmed_email = db.BooleanProperty(default = False)

def check_if_exists(cls, email):
return cls.query( == email).get()

def add_new_user(cls, name, email, password):
user = cls.check_if_exists(email)

if not user:
random_bytes = urandom(64)
salt = b64encode(random_bytes).decode('utf-8')
hashed_password = salt + sha256(salt + password).hexdigest()

confirmation_code = str(uuid.uuid4().get_hex())

new_user_key = cls(


return {
'created': True,

return {
'created': False,
'title': 'This email is already in use',
'message': 'Please log in if this is your email account. '

Answer Source

You have a typo: require instead of required here:

    password = db.StringProperty(require = True)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download