Validation error, field:email while trying to conect to SQL Express

139 views
Skip to first unread message

Raul Monares

unread,
Feb 17, 2017, 3:36:01 PM2/17/17
to web2py-users
I'm trying to use SQL Express for a project. When I try to sign up using the demo app, I get this error

 Validation error, field:email <gluon.validators.IS_NOT_IN_DB object at 0x00000000049114E0>

All auth tables are created in the database. I tried migrate = false, migrate = true. Same result.

The connection string is mssql4://tarkus:rushrush@localhost/DNC_TRAINING. 
I'm using IIS7, SQL Server Express 13.0.4001.0, db_codec = 'SQL_Latin1_General_CP1_CI_AS'

Dave S

unread,
Feb 17, 2017, 4:16:24 PM2/17/17
to web2py-users
Validation errors don't usually involve the connection string.  In this case, you either have an existing entry with the same email field as you're trying to use, or perhaps you haven't supplied a value for this field and the validator is considering the NULL to match a NULL entry (not all the validators would do that, though).

Is this a demo database, or a database you've created?  Can you use a non-web2py tool to connect to the database and examine what's in the fields?  Such as a console app or a portal site?

Dave
/dps


Raul Monares

unread,
Feb 17, 2017, 5:35:43 PM2/17/17
to web2py-users
The database is new and completely empty. migrate = true is working because the auth tables are created automatically.
I've used in the past Mysql, Postgresql, Firebird, DB/2 and this has never happened. It's as if the validator is not recognizing the existing table auth_user.

Leonel Câmara

unread,
Feb 18, 2017, 2:00:16 PM2/18/17
to web2py-users
The error is not in the connection string or with the migrate settings.

I would try this in the command line to see what the problem is:

cd web2pydirectoryhere
python web2py
.py -S nameofyourapplication -M
IS_NOT_IN_DB
(db, 'auth_user.email')('em...@youknowisnotthere.com')


If everything is working fine then it should return:

If it doesn't, then show us the full traceback here.


Raul Monares

unread,
Feb 21, 2017, 7:11:59 PM2/21/17
to web2py-users
I changed from SQL Server Express 2016 to SQL Server Express 2012 and had no problems.
Reply all
Reply to author
Forward
0 new messages