i have web2py modules that insert new data for new web2py app:
*modules/test_install.py*
#!/usr/bin/env python
# coding: utf8

import sys; 
sys.path.append('site/web2py/')

from gluon import current
#from gluon import *
from gluon.contrib.webclient import WebClient

install = WebClient('http://127.0.0.1:8000/test/install/',
postbacks = True)

install.get('index')

*if current.T('Installation Done') in install.text:*
print "Installation Done"
else:
print "Installation Failed"

Web2py had already running with :
python ~/site/web2py/web2py.py

But when i tried to execute web2py module in another terminal on the same 
machine it return an error

Test:~ Test$ python ~/site/web2py/applications/test/modules/test_install.py
Traceback (most recent call last):
  File 
"/Users/MacBookPro/site/web2py/applications/test/modules/test_install.py", 
line 18, in <module>
    if current.T('Installation Done') in install.text:
AttributeError: 'thread._local' object has no attribute 'T'

is there any way to fix it?

thanks and best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to