should be

casesdb.define_table('case_data',migrate=True,*casedata_halfschema)


On Aug 1, 7:32 am, Phyo Arkar <[email protected]> wrote:
> Hello all,
>
> I am getting very weird syntax error :
>
> Below is the controller code :
>
> global RESPONSE , REQUEST, SESSION , db
>
> REQUEST = Request()
> REQUEST = request
> SESSION = Session()
> SESSION = session
> RESPONSE = Response()
> RESPONSE = response
>
> casesdb=DAL('mysql://r...@localhost/'+session.db_name)
> casesdb.define_table('case_data',*casedata_halfschema,migrate=True) # << -
> Here the error
> def index():
>     response.files.append( URL( r = request, c = 'static/css/smoothness', f
> = 'jquery-ui.css' ) )
>     response.files.append( URL( r = request, c = 'static/src', f =
> 'grid.loader.js' ) )
>     response.files.append( URL( r = request, c = 'static/css', f =
> 'ui.jqgrid.css' ) )
>     response.files.append( URL( r = request, c = 'static', f =
> 'jquery-ui.js' ) )
>
> Traceback (most recent call last): File "/root/web2py/gluon/restricted.py",
> line 176, in restricted
>     ccode = compile2(code,layer)\n  File "/root/web2py/gluon/restricted.py",
> line 163, in compile2
>     return compile(code.rstrip().replace(\'\\r\\n\',\'\\n\')+\'\\n\', layer,
> \'exec\')
>   File "/root/web2py/applications/sExtract/controllers/parsing.py", line 36
>
> casesdb.define_table(\'case_data\',*casedata_halfschema,migrate=True)
>
> SyntaxError: invalid syntax\n'
>
> how is casesdb.define_table('case_data',*casedata_halfschema,migrate=True)
> an invalid syntax?
> What weird is , it is working completely fine in my development machine,
> only difference is my laptop (development machine is with python 2.6) and on
> my debian server it is python 2.5
>
> because of that ?

Reply via email to