1.99.2, WinXP

Model works fine from browser and from integrated shell.
But there is problem from exec_environment, when model contains Auth:

os.chdir(r'c:\python27\Lib\site-packages\web2py')
from gluon.shell import exec_environment
cas = exec_environment('applications/cas/models/db.py')


Traceback (most recent call last):
  File "<pyshell#80>", line 1, in <module>
    cas = exec_environment('applications/ereceipts_server/models/
db.py')
  File "C:\Python27\Lib\site-packages\web2py\gluon\shell.py", line 71,
in exec_environment
    execfile(pyfile, env)
  File "applications/ereceipts_server/models/db.py", line 36, in
<module>
    auth = Auth(db, hmac_key=Auth.get_or_create_key())
  File "C:\Python27\Lib\site-packages\web2py\gluon\tools.py", line
811, in get_or_create_key
    request = current.request
AttributeError: 'thread._local' object has no attribute 'request'

Reply via email to