Thanks for reporting this. this is the nastiest bug in long time. http://groups.google.com/group/web2py/t/f1dab11ffb1ec337
On Mar 5, 10:04 pm, Yannick <[email protected]> wrote: > Hello Mate, > Using latest trunk Version 1.57 > Here is the model: > ..... > db =SQLDB('mysql://userName:p...@localhost:3306/dbname') > class MyAuth(Auth): > def __init__(self, environment, T, db= None): > ..... > ..... > auth = MyAuth(globals(), T,db) > auth.define_tables() > .... > Here is the controller: > > auth.settings.on_failed_authorization=URL(r=request,f='error') > auth.settings.login_url=URL(r=request,f='login') > auth.messages.invalid_login= 'Very Very Bad Login' > auth.messages.logged_in = 'Perfect' > > def register(): > return dict(form=auth.register(next="login")) > > def login(): > return dict(form=auth.login(next="profile")) > > And now I'm trying to access the application through the register > page: (http://127.0.0.1:8000/AppName/default/register) > > Here is the error (with Mysql) which WORK FINE with SQLITE but > complaint with MYSQL on tool.py: > -------------------------------------------------------------------------------------------------------- > > Error traceback: > Traceback (most recent call last): > File "/opt/web2py/gluon/restricted.py", line 98, in restricted > exec ccode in environment > File "/opt/web2py/applications/webFunc2/controllers/default.py", > line 27, in <module> > File "/opt/web2py/gluon/globals.py", line 75, in <lambda> > self._caller = lambda f: f() > File "/opt/web2py/applications/webFunc2/controllers/default.py", > line 8, in register > return dict(form=auth.register(next="login")) > File "/opt/web2py/gluon/tools.py", line 649, in register > group_id = self.add_group("user_%s" % form.vars.id, description) > File "/opt/web2py/gluon/tools.py", line 1058, in add_group > self.log_event(log % dict(group_id=group_id, role=role)) > File "/opt/web2py/gluon/tools.py", line 508, in log_event > origin=origin, user_id=user_id) > File "/opt/web2py/gluon/sql.py", line 1305, in insert > self._db._execute(query) > File "/opt/web2py/gluon/sql.py", line 633, in <lambda> > **b) > File "/usr/lib/python2.5/site-packages/MySQLdb/cursors.py", line > 166, in execute > self.errorhandler(self, exc, value) > File "/usr/lib/python2.5/site-packages/MySQLdb/connections.py", line > 35, in defaulterrorhandler > raise errorclass, errorvalue > OperationalError: (1048, "Column 'user_id' cannot be null") > > -------------------------------------------------------------------------------------------------------- > > Please let me know If you have any information... I don't really > understand why the user_id is null using MySQL and not the case using > SQLITE. > > Thanks for your help, > Yannick P. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

