Sweet! Thanks for the advice, I'll adjust those lines.
On Sep 5, 10:21 am, mdipierro <[email protected]> wrote:
> I think the error is not there but here:
>
> ows = db(db.auth_user.location==request.args
> [1],db.auth_user.registration_key=='').select()
>
> because db(... , ...) is not a valid syntax. Should be
>
> ows = db(db.auth_user.location==request.args[1])
> (db.auth_user.registration_key=='').select()
>
> or
>
> ows = db((db.auth_user.location==request.args[1])&
> (db.auth_user.registration_key=='')).select()
>
> Not sure why you get the error at the wrong line number.
>
> On Sep 5, 8:56 am, Derek <[email protected]> wrote:
>
>
>
> > line 95 is the first line: elif request.args[0]=='location':
>
> > I'm actually getting this error everywhere. On my development machine
> > which is running the binary Windows web2py distribution, as well as
> > both the Google App Launcher and the Google App Engine.
>
> > On Sep 5, 8:26 am, mdipierro <[email protected]> wrote:
>
> > > I cannot tell which one is line 95. Are you getting this error on the
> > > same or a different machine than the one used for development?
>
> > > On Sep 5, 1:51 am, Derek <[email protected]> wrote:
>
> > > > Hi All,
>
> > > > I really don't understand what's going on. I've been developing/
> > > > learning in web2py for the past week, and suddenly when I decide to
> > > > deploy my code, I'm getting this odd error:
>
> > > > Traceback (most recent call last):
> > > > File "gluon/restricted.py", line 178, in restricted
> > > > File "C:/web2py/applications/icoexist/controllers/default.py", line
> > > > 138, in <module>
> > > > File "gluon/globals.py", line 101, in <lambda>
> > > > File "C:/web2py/applications/icoexist/controllers/default.py", line
> > > > 95, in view
> > > > TypeError: __call__() takes at most 2 arguments (3 given)
>
> > > > The offending line (95) is here, followed by the balance of the block.
> > > > I don't see a convenient way to paste the whole ticket here.
>
> > > > elif request.args[0]=='location':
> > > > rows = db(db.auth_user.location==request.args
> > > > [1],db.auth_user.registration_key=='').select()
> > > > locationRows = db().select(db.auth_user.location,
> > > > orderby=db.auth_user.location)
> > > > locations = []
> > > > uLocation = ''
> > > > for lRows in locationRows:
> > > > if uLocation != lRows.location:
> > > > locations.append(lRows.location)
> > > > uLocation = lRows.location
> > > > return dict(users=rows,locations=locations)
>
> > > > This code HAS been working. Any ideas what's going on?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" 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
-~----------~----~----~----~------~----~------~--~---