1.74.6 please

On Jan 19, 11:02 am, Carl <carl.ro...@gmail.com> wrote:
> thanks for the URL.
> I've been doing a "binary search" with versions but I've not checked every
> version. here's what I've found so far:
>
> v1.67.2 . works locally & GAE
> v1.68.2 . works locally & GAE
> v1.69.1 . works locally & GAE
> v1.70.1 . works locally & GAE
> v1.71.1 . works locally. GAE reports 'Internal error' on start-up.
> v1.71.2 . works locally. GAE reports 'Internal error' on submitting
> registration form
> v1.72.3 . works locally but fails on GAE at 'gluon/main.py", line 469,
> session._try_store_in_db'
> v1.73.1 . fails locally at 'gluon\globals.py", line 385, in
> _try_store_on_disk'
> v1.74.1 . fails locally at 'gluon\globals.py", line 375, in
> _try_store_on_disk'
>
> Log output for v1.71.1 GAE
>
> NameError: global name 'SQLCustomType' is not defined
>
> That logout doesn't look very helpful.
>
> Let me know what version you'd like to see a trace from the log for.
>
> 2010/1/19 mdipierro <mdipie...@cs.depaul.edu>
>
> >http://web2py.com/examples/static/xxxx/web2py_src.zip
>
> > where xxxx is a version. Only some versions are stored.
>
> > I will look at your code asap.
>
> > On Jan 19, 5:58 am, Carl <carl.ro...@gmail.com> wrote:
> > > Massimo, I've sent you a stand-alone example that is as small as
> > > possible. I don't have upload access to Files in this group, hence the
> > > direct email.
>
> > > I was using Web2py v1.67.2 and it was only an upgrade to v1.74.5 that
> > > produced this error.
>
> > > I am willing to test the code with each version of Web2py since
> > > v1.67.2 to narrow down the change (if you think that would help you
> > > debug).
>
> > > Where can I get these versions of web2py?
>
> > > On Jan 18, 2:14 pm, Carl <carl.ro...@gmail.com> wrote:
>
> > > > hi,
>
> > > > I made some progress. The problem looks to be in the area of writing
> > > > data to GAE. Until I do this I can register and login successful
> > > > (provided I tweak the code not to care about this populated data).
>
> > > > Once I call the populate() function below I can no longer register/
> > > > login.
>
> > > > class Salutations():
> > > >     def __init__(self, db, T):
> > > >         (self.db, self.T) = (db, T)
>
> > > >     def populate( self):
> > > >         '''
> > > >             Envoy defines a short list of salutations
> > > >             Salutations help build a relationship with a client
> > > >         '''
>
> > > >         T = self.T
> > > >         salutations= (
> > > >                       (10, T('Mr')),
> > > >                       (20, T('Ms')),
> > > >                       (30, T('Mrs')),
> > > >                       (40, T('Miss')),
> > > >                       (50, T('Dr')),
> > > >                       (60, T('Prof.')) )
>
> > > >         for salu in salutations:
> > > >             dbsals  = self.db
> > > > (self.db.salutations.salutation_order==salu[0]).select()
> > > >             if not dbsals:
> > > >                 self.db.salutations.insert(salutation_order=salu[0],
> > > > salutation=unicode(salu[1]))
> > > >             else:
> > > >                 dbsals[0].update_record( salutation_order=salu[0],
> > > > salutation=unicode(salu[1]))
>
> > > >         return( len(salutations))
>
> > > > I tried changing the unicode() calls to str() but it made no material
> > > > difference.
>
> > > > Am I making a basic error in populate() ?
>
> > > > On Jan 16, 12:29 pm, Carl <carl.ro...@gmail.com> wrote:
>
> > > > > Additional information...
>
> > > > > In thinking that perhaps GAE hadn't delete *all* my data and hence
> > had
> > > > > hidden corruption I looked at an earlier version of my app.
>
> > > > > GAE allows me to run different versions of an app against the same
> > > > > database (big table data).
>
> > > > > I ran my previous version that is built on Web2py 1.67.2 and it
> > > > > registers/logins successfully.
> > > > > So although our issue is subtle at least it's on our side and I don't
> > > > > need to try talking to google staff :)
>
> > > > > On Jan 15, 9:20 pm, Carl <carl.ro...@gmail.com> wrote:
>
> > > > > > I had deleted GAE's tables before contacting you; I've just deleted
> > them
> > > > > > again but I get the same behaviour. There is perhaps a subtle
> > difference
> > > > > > between dev_appserver and the real-deal GAE.
>
> > > > > > I'll put together a stand-alone app tomorrow.
>
> > > > > > 2010/1/15 mdipierro <mdipie...@cs.depaul.edu>
>
> > > > > > > One more test. What bothers me is that is works on dev_appserver
> > but
> > > > > > > not when deployed. There must be some corrupted data in the
> > database.
> > > > > > > Is it an option for you to delete all data on GAE?
>
> > > > > > > On Jan 15, 12:22 pm, Carl <carl.ro...@gmail.com> wrote:
> > > > > > > > I've taken out the orderby clauses but the login failure still
> > happens
> > > > > > > (I've
> > > > > > > > had those clauses in for earlier versions of web2py but it was
> > worth
> > > > > > > > looking).
>
> > > > > > > > Perhaps these two statements (default.py in user() ) are the
> > issue on
> > > > > > > GAE?
> > > > > > > > db.auth_user.billing_country.requires =
> > IS_NULL_OR(IS_NOT_EMPTY())
> > > > > > > > db.auth_user.country.requires = IS_NULL_OR(IS_NOT_EMPTY())
>
> > > > > > > > I am using a custom form which doesn't not display these two
> > fields so
> > > > > > > I've
> > > > > > > > added these two statements to keep the registration process
> > happy which
> > > > > > > > would otherwise want values from the user for them.
>
> > > > > > > > in db.py both fields have the clause:
> > > > > > > > requires=IS_NULL_OR(IS_IN_DB(db,db.iso3166.id,'%(country)s')))
>
> > > > > > > > Does that aim/explanation make sense to you? The code is quite
> > old but
> > > > > > > > perhaps Web2py is translating to GAE in a subtley different
> > way? If I
> > > > > > > remove
> > > > > > > > both statements then registration fails so I can't simply
> > remove them to
> > > > > > > > test if the app works on GAE.
>
> > > > > > > > Is there an alternative approach I could take? At least to test
> > further?
>
> > > > > > > > 2010/1/15 mdipierro <mdipie...@cs.depaul.edu>
>
> > > > > > > > > I  see a lot of orderby in those validators that create
> > problems.
>
> > > > > > > > > I think the problem is there.
>
> > > > > > > > > Try remove the orderby and see if the error goes away.
>
> > > > > > > > > If it does there are two options:
> > > > > > > > > 1) you need an index
> > > > > > > > > 2) the query is somehow invalid on GAE
>
> > > > > > > > > Massimo
>
> > > > > > > > > On Jan 15, 11:17 am, Carl <carl.ro...@gmail.com> wrote:
> > > > > > > > > > I made the changes you listed but the failed login still
> > persists
> > > > > > > (you
> > > > > > > > > > probably expected it to but I was forever hopeful! :)
>
> > > > > > > > > > I'll see if I can create a small app that replicates the
> > issue and
> > > > > > > send
> > > > > > > > > it
> > > > > > > > > > to you.
> > > > > > > > > > thanks for your time.
>
> > > > > > > > > > 2010/1/15 mdipierro <mdipie...@cs.depaul.edu>
>
> > > > > > > > > > > I do not know why you experience the behavior that you do
> > but there
> > > > > > > > > > > are some errors in those commented lines:
>
> > > > > > > > > > > 1)
>
> > > > > > > > > > >    #cdrdb.Field('country', db.iso3166,
> > requires=IS_NULL_OR
> > > > > > > > > > > (IS_INT_IN_RANGE(0, 1e100))),
>
> > > > > > > > > > > should be
>
> > > > > > > > > > >    cdrdb.Field('country', db.iso3166, requires=IS_IN_DB
> > > > > > > > > > > (db,db.iso3166.id,'%(country)s'))
>
> > > > > > > > > > > 2)
>
> > > > > > > > > > >    #cdrdb.Field('agent_salutation', db.salutations,
> > > > > > > > > > > requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))),
>
> > > > > > > > > > > should be
>
> > > > > > > > > > >    cdrdb.Field('agent_salutation', db.salutations,
> > > > > > > > > > > requires=IS_NULL_OR(db,db.salutations.id
> > ,'%(salutation)s'))
>
> > > > > > > > > > > sure you want a reference for this and not a IS_IN_SET?
>
> > > > > > > > > > > 3)
>
> > > > > > > > > > >    #cdrdb.Field('agent_country', db.iso3166,
> > label='Country',
> > > > > > > > > > > requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))),
>
> > > > > > > > > > > should be
>
> > > > > > > > > > >    cdrdb.Field('agent_country', db.iso3166,
> > label='Country',
> > > > > > > > > > > requires=IS_NULL_OR(IS_IN_DB(db,db.iso3166.id
> > ,'%(country)s'))
>
> > > > > > > > > > > 4)
>
> > > > > > > > > > >    #cdrdb.Field('billing_country', db.iso3166,
> > label='Billing
> > > > > > > > > > > country', requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100)))
>
> > > > > > > > > > > should be
>
> > > > > > > > > > >    #cdrdb.Field('billing_country', db.iso3166,
> > label='Billing
> > > > > > > > > > > country', requires=IS_NULL_OR(IS_IN_DB(db,db.iso3166.id
> > > > > > > ,'%(country)
> > > > > > > > > > > s'))
>
> > > > > > > > > > > 5)
>
> > > > > > > > > > >    #cdrdb.auth_user.country.requires =
> > IS_NULL_OR(IS_NOT_EMPTY())
>
> > > > > > > > > > > I am not so sure what you need here.
>
> > > > > > > > > > > Massimo
>
> > > > > > > > > > > On Jan 15, 10:38 am, Carl <carl.ro...@gmail.com> wrote:
> > > > > > > > > > > > hi
>
> > > > > > > > > > > > I gotten down to the area that's tripping up.
>
> > > > > > > > > > > > My app will login correctly if I comment out the
> > following lines;
> > > > > > > > > > > > I've put those commented lines in context below...
>
> > > > > > > > > > > > FILE: models/dp.py
> > > > > > > > > > > > db.define_table('iso3166',
> > > > > > > > > > > >                 SQLField('country', 'string',
> > length=128,
> > > > > > > > > > > > required=True),
> > > > > > > > > > > >                 SQLField('country_iso', 'integer',
> > > > > > > required=True),
> > > > > > > > > > > >                 SQLField('country_order', 'integer',
> > > > > > > required=True))
>
> > > > > > > > > > > > db.define_table('salutations',
> > > > > > > > > > > >                 SQLField('salutation', 'string',
> > length=128,
> > > > > > > > > > > > required=True),
> > > > > > > > > > > >                 SQLField('salutation_order', 'integer',
> > > > > > > > > > > > required=True))
>
> > > > > > > > > > > > auth.settings.table_user = db.define_table(
> > > > > > > > > > > >     auth.settings.table_user_name,
>
> ...
>
> read more »
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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.


Reply via email to