SQL warning

55 views
Skip to first unread message

Joel Samuelsson

unread,
May 15, 2019, 8:59:06 AM5/15/19
to web2py-users
Hi,

I'm running web2py in a docker container to run some tests against a fresh database. I get this warning that I'd like to get rid of:
/var/www/DataCollectionManager/web2py/gluon/dal.py:1961: Warning: Incorrect integer value: '' for column 'registration_id' at row 1 ret = self.cursor.execute(command, *a[1:], **b)

Does anyone know where that warning may come from? The row itself is of little help. I know it's from the database but why does it appear?
I'm on version 2.17.1-stable+timestamp.2018.08.06.01.02.56.

Dave S

unread,
May 15, 2019, 12:31:10 PM5/15/19
to web2py-users
It would probably help to show your model for this table, and what your controller is doing when this error is logged.

/dps
 

Joel Samuelsson

unread,
May 16, 2019, 5:26:21 AM5/16/19
to web2py-users
It is not my table but something builtin I'm guessing. I have no column with name registration_id.

Dave S

unread,
May 16, 2019, 9:35:03 PM5/16/19
to web2py-users


On Thursday, May 16, 2019 at 2:26:21 AM UTC-7, Joel Samuelsson wrote:
It is not my table but something builtin I'm guessing. I have no column with name registration_id.

That name sounds like it is from Auth (auth_user, probably).  Please show your model file where Auth is instantiated;  did you make any changes in the lines above that?

What flavor of Docker?  (OS, OS version, Python version; we have 2.17.1 from your first message,

You might also consider using a newer version of web2py; 2.18.5 came out on April 7th, and there have been a bunch of bug fixes since 2.17.1.

/dps
/


Joel Samuelsson

unread,
May 17, 2019, 11:31:17 AM5/17/19
to web2py-users
Hi,

Thanks for your input Dave. It is indeed from Auth. If I change lines (1867-1869) in gluon/tools.py:
Field('registration_id', length=512,
writable=False, readable=False, default='',
label=self.messages.label_registration_id),
to
Field('registration_id', length=512,
writable=False, readable=False, default=123,
label=self.messages.label_registration_id),
the warning goes away. It all stems from a call to db.auth_user.insert where registration_id is not specified. What is the column for? 
Reply all
Reply to author
Forward
0 new messages