Yes these are the hardest bugs to trace. But it means that python cannot convert the string into an integer... so your string will either be
Null, '', 'a234' -Thadeus On Wed, Nov 18, 2009 at 5:21 PM, Wes James <compte...@gmail.com> wrote: > > It's an auth db with the student db - like in the book. > > I register -> put some data in auth_user <- then I log in and put some > data in to the student fields and click submit and this error pops up > as ticket. > > I'm using an sqlite3 db on os x... > > I've even dropped the tables several times and retried - guess i'll > need to poke in the crud.create with wingide to see what's up. > > -wes > > On Wed, Nov 18, 2009 at 3:55 PM, Thadeus Burgess <thade...@thadeusb.com> > wrote: > > It means you have a field that is expecting an integer, and the actual > data > > in the database is either Null or has characters in the string, more > often > > than not, it means this data is null. > > > > Try IS_NULL_OR(IS_IN_DB) as a solution? > > > > -Thadeus > > > > > > > > > > On Wed, Nov 18, 2009 at 4:48 PM, Wes James <compte...@gmail.com> wrote: > >> > >> What does this mean: > >> > >> form=crud.create(db.student,next=URL(r=request)) > >> File "/opt/cnrsa/gluon/tools.py", line 2101, in create > >> deletable=False, > >> File "/opt/cnrsa/gluon/tools.py", line 2048, in update > >> keepvalues=self.settings.keepvalues): > >> File "/opt/cnrsa/gluon/sqlhtml.py", line 865, in accepts > >> fields[fieldname] = int(fields[fieldname]) > >> ValueError: invalid literal for int() with base 10: '' > >> > >> I get it with this: > >> > >> SQLField("sid",db.auth_user, default=user_id), > >> > >> but not with this: > >> > >> SQLField("sid",default=user_id), > >> > >> > >> -wes > >> > >> > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---