On Jun 24, 12:11 pm, Deepan <[email protected]> wrote:
> Hi,
>
> I am having an error in web2py app. I am not able to figure out what
> is causing the error. It would be of great help if any can figure out
> the error and let me know.
>
> Error is as follows:
>
> Traceback (most recent call last):
> File "/cube/apps/web2py/gluon/restricted.py", line 178, in
> restricted
> exec ccode in environment
Here's the start of where you should look:
> File "/cube/apps/web2py/applications/rnai/models/db.py", line 34, in
> <module>
> auth_table = db.define_table(Field('university', length=128,
> default=''),)
The problem (it turns out) is in your table definition...
> File "/cube/apps/web2py/gluon/sql.py", line 1262, in define_table
> tablename = cleanup(tablename)
> File "/cube/apps/web2py/gluon/sql.py", line 571, in cleanup
> if re.compile('[^0-9a-zA-Z_]').findall(text):
> TypeError: expected string or buffer
sql.py - which is trying to set the tablename - is not able to,
because you did not supply a string as the first argument;
You need to name the table, then the fields;
See http://web2py.com/book/default/section/6/4
>
> Thanks