Need to see the code near this line which is causing the error:
"/home/paolo/Dropbox/git/web2py/applications/bikend/models/db.py", line
252, in <module>
format='%(name)s (%(id)s)'
It might be missing a comma or parentheses.
On Wednesday, June 13, 2012 7:08:51 AM UTC-7, Gabriella Canavesi wrote:
>
> Johann thanks, it worked!
> but now I got a new error :(
>
> Ticket:
> Traceback (most recent call last):
> File "/home/paolo/Desktop/git/web2py/gluon/restricted.py", line 205,
> in restricted
> exec ccode in environment
> File
> "/home/paolo/Dropbox/git/web2py/applications/bikend/models/db.py", line
> 252, in <module>
> format='%(name)s (%(id)s)'
> File "/home/paolo/Desktop/git/web2py/gluon/dal.py", line 6731, in
> define_table
> polymodel=polymodel)
> File "/home/paolo/Desktop/git/web2py/gluon/dal.py", line 795, in
> create_table
> self.create_sequence_and_triggers(query,table)
> File "/home/paolo/Desktop/git/web2py/gluon/dal.py", line 2175, in
> create_sequence_and_triggers
> self.execute(query)
> File "/home/paolo/Desktop/git/web2py/gluon/dal.py", line 1489, in
> execute
> return self.log_execute(*a, **b)
> File "/home/paolo/Desktop/git/web2py/gluon/dal.py", line 1483, in
> log_execute
> ret = self.cursor.execute(*a, **b)
> ProgrammingError: syntax error at or near "end"
> LINE 15: end VARCHAR(512),
>
> The sql.log is attached.
>
> Paolo
>
>
> Il 13.06.2012 15:53 Johann Spies ha scritto:
> > On 13 June 2012 14:06, Paolo <[email protected] [1]> wrote:
> >
> >> Hi Johann,
> >> Yes, I started the db in postgres is totally empty.
> >> As y suggested I've removed all the files in databases/ but I am
> >> still getting the same error.
> >>
> >> What do you mean with "drop all the app-related-tables" ?
> >
> > in pgadmin3 or in psql:
> >
> > drop table <tablename>
> >
> > for all the tables in the database that can be linked to your app.
> >
> > But don't do this if you have data in there that you want to keep.
> >
> > Did you try the migrate = False option? or fake-migrate = True?
> >
> > Regards
> > Johann
>
> --
> Paolo
>
> timestamp: 2012-06-13T16:02:38.294192
> CREATE TABLE auth_user(
> id SERIAL PRIMARY KEY,
> first_name VARCHAR(128),
> last_name VARCHAR(128),
> email VARCHAR(512),
> password VARCHAR(512),
> registration_key VARCHAR(512),
> reset_password_key VARCHAR(512),
> registration_id VARCHAR(512),
> nickname VARCHAR(512),
> full_name VARCHAR(512),
> city VARCHAR(512),
> country VARCHAR(512),
> picture VARCHAR(32768),
> caption_picture TEXT,
> thumbnail VARCHAR(32768),
> slugNickname VARCHAR(512),
> slugFullname VARCHAR(512),
> language TEXT,
> bio VARCHAR(512),
> ui_notifications CHAR(1),
> blog_url VARCHAR(512),
> public CHAR(1),
> show_community CHAR(1),
> show_multimedia CHAR(1),
> show_review CHAR(1),
> show_question CHAR(1)
> );
> success!
> timestamp: 2012-06-13T16:02:38.492421
> CREATE TABLE auth_group(
> id SERIAL PRIMARY KEY,
> role VARCHAR(512),
> description TEXT
> );
> success!
> timestamp: 2012-06-13T16:02:38.599654
> CREATE TABLE auth_membership(
> id SERIAL PRIMARY KEY,
> user_id INTEGER REFERENCES auth_user(id) ON DELETE CASCADE,
> group_id INTEGER REFERENCES auth_group(id) ON DELETE CASCADE
> );
> success!
> timestamp: 2012-06-13T16:02:38.668436
> CREATE TABLE auth_permission(
> id SERIAL PRIMARY KEY,
> group_id INTEGER REFERENCES auth_group(id) ON DELETE CASCADE,
> name VARCHAR(512),
> table_name VARCHAR(512),
> record_id INTEGER
> );
> success!
> timestamp: 2012-06-13T16:02:38.752233
> CREATE TABLE auth_event(
> id SERIAL PRIMARY KEY,
> time_stamp TIMESTAMP,
> client_ip VARCHAR(512),
> user_id INTEGER REFERENCES auth_user(id) ON DELETE CASCADE,
> origin VARCHAR(512),
> description TEXT
> );
> success!
> timestamp: 2012-06-13T16:02:38.835278
> CREATE TABLE auth_cas(
> id SERIAL PRIMARY KEY,
> user_id INTEGER REFERENCES auth_user(id) ON DELETE CASCADE,
> created_on TIMESTAMP,
> service VARCHAR(512),
> ticket VARCHAR(512),
> renew CHAR(1)
> );
> success!
> timestamp: 2012-06-13T16:02:38.930963
> CREATE TABLE route(
> id SERIAL PRIMARY KEY,
> name VARCHAR(512),
> user_id INTEGER REFERENCES auth_user(id) ON DELETE CASCADE,
> slug VARCHAR(512),
> length FLOAT8,
> height INTEGER,
> max_elevation INTEGER,
> max_elevation_lat FLOAT8,
> max_elevation_lgt FLOAT8,
> min_elevation INTEGER,
> min_elevation_lat FLOAT8,
> min_elevation_lgt FLOAT8,
> start VARCHAR(512),
> end VARCHAR(512),
> photo_id INTEGER REFERENCES pictures(id) ON DELETE CASCADE,
> signs INTEGER REFERENCES signs(id) ON DELETE CASCADE,
> kml VARCHAR(512),
> svg_altitude VARCHAR(512),
> desc_it INTEGER REFERENCES description(id) ON DELETE CASCADE,
> desc_en INTEGER REFERENCES description(id) ON DELETE CASCADE,
> desc_de INTEGER REFERENCES description(id) ON DELETE CASCADE,
> desc_es INTEGER REFERENCES description(id) ON DELETE CASCADE,
> categories TEXT,
> status VARCHAR(512),
> is_active CHAR(1),
> created_on TIMESTAMP,
> created_by INTEGER REFERENCES auth_user(id) ON DELETE CASCADE,
> modified_on TIMESTAMP,
> modified_by INTEGER REFERENCES auth_user(id) ON DELETE CASCADE
> );
>