Yes, my model is untouched:

if request.env.web2py_runtime_gae:            # if running on Google
App Engine
    db = DAL('gae')                           # connect to Google
BigTable
    session.connect(request, response, db=db) # and store sessions and
tickets there
    ### or use the following lines to store sessions in Memcache
    # from gluon.contrib.memdb import MEMDB
    # from google.appengine.api.memcache import Client
    # session.connect(request, response, db=MEMDB(Client())
else:                                         # else use a normal
relational database
    db = DAL('sqlite://storage.sqlite')       # if not, use SQLite or
other DB
## if no need for session
# session.forget()

Everything works except this method.

On Oct 4, 3:24 pm, mdipierro <[email protected]> wrote:
> You are right. It seems to think it is not on GAE.
>
> Do you have this in your model?
>
> if request.env.web2py_runtime_gae:
>     db = DAL('gae')
>     session.connect(request, response, db=db)
> else:
>     db = DAL('sqlite://storage.sqlite')
>
> On Oct 4, 2:33 am, Vidul Petrov <[email protected]> wrote:
>
>
>
> > Hi all,
>
> > I am getting the following error on GAE while trying to change the
> > password (all other methods work):
>
> > In FILE: /base/data/home/apps/spain-estates/1.336749493957536875/
> > applications/init/controllers/default.py
>
> > Traceback (most recent call last):
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/gluon/
> > restricted.py", line 178, in restricted
> >     exec ccode in environment
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/
> > applications/init/controllers/default.py:user", line 182, in <module>
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/gluon/
> > globals.py", line 102, in <lambda>
> >     self._caller = lambda f: f()
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/
> > applications/init/controllers/default.py:user", line 156, in user
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/gluon/
> > tools.py", line 489, in __call__
> >     return self.change_password()
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/gluon/
> > tools.py", line 1244, in change_password
> >     self.messages.mismatched_password)]))
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/gluon/
> > sqlhtml.py", line 866, in factory
> >     return SQLFORM(SQLDB(None).define_table('no_table', *fields),
> >   File "/base/data/home/apps/spain-estates/1.336749493957536875/gluon/
> > sql.py", line 674, in __init__
> >     os.mkdir(self._folder)
> > AttributeError: 'module' object has no attribute 'mkdir'
>
> > A temporary fix (only for GAE):
>
> > 672,674c672,674
> > <         if self._folder:
> > <             if not os.path.exists(self._folder):
> > <                 os.mkdir(self._folder)
> > ---
>
> > > #        if self._folder:
> > > #            if not os.path.exists(self._folder):
> > > #                os.mkdir(self._folder)
>
> > Any idea what is confusing Web2py to think that it is not on GAE?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to