python - Can't figure out Web2py Ticket error its odd -


i'm new web2py , unable understand error ticket throwing up. can explain error , why occurring?

ticket id 127.0.0.1.2016-05-28.15-45-10.493c5f3c-e5f2-4034-8e82-69637b1fcc35  <type 'exceptions.syntaxerror'> invalid table/column name "size" "all" reserved sql/nosql keyword  version web2py™ version 2.12.1-stable+timestamp.2015.08.07.07.22.06  traceback (most recent call last):   file "c:\users\sharankumar\desktop\new\gluon\restricted.py", line 227, in restricted     exec ccode in environment   file "c:/users/sharankumar/desktop/new/applications/mylogin/models/db.py", line 232, in <module>     format='%(name)s')   file "c:\users\sharankumar\desktop\new\gluon\packages\dal\pydal\base.py", line 817, in define_table     table = self.lazy_define_table(tablename,*fields,**args)   file "c:\users\sharankumar\desktop\new\gluon\packages\dal\pydal\base.py", line 834, in lazy_define_table     table = table_class(self, tablename, *fields, **args)   file "c:\users\sharankumar\desktop\new\gluon\packages\dal\pydal\objects.py", line 351, in __init__     check_reserved(field_name)   file "c:\users\sharankumar\desktop\new\gluon\packages\dal\pydal\base.py", line 519, in check_reserved_keyword     'invalid table/column name "%s" "%s" reserved sql/nosql keyword' % (name, backend.upper())) syntaxerror: invalid table/column name "size" "all" reserved sql/nosql keyword 

in db.define_table(), appears have attempted create field named "size", not allowed because sql reserved word. should either change field name or use "rname" argument specify different name database use:

    field('size', rname='object_size', ...) 

with above, can use name "size" in of python code, database create field name "object_size".


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -