[thuban-Bugs][95] pysqlite2 not supported queries

thuban-bugs@wald.intevation.org thuban-bugs at wald.intevation.org
Wed Apr 19 12:30:42 CEST 2006


Bugs item #95, was opened at 2006-04-19 12:30
You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=105&aid=95&group_id=6
Or by replying to this e-mail entering your response between the following markers: 
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
(enter your response here)
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+

Status: Open
Priority: 3
Submitted By: Didrik Pinte (dpinte)
Assigned to: Nobody (None)
Summary: pysqlite2 not supported queries 
Resolution: None
Version: None
Category: None


Initial Comment:
Here are problematic queries for pysqlite2. Works well with pysqlite 1.

INSERT INTO Table001 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008) VALUES (%(xxxxxxxxx)s, %(AREA)s, %(PERIMETER)s, %(PONET_)s, %(PONET_ID)s, %(POPYTYPE)s, %(POPYREG)s, %(POPYCOUN)s, %(POPYADMIN)s);
INSERT INTO Table001 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008) VALUES (%(xxxxxxxxx)s, %(AREA)s, %(PERIMETER)s, %(PONET_)s, %(PONET_ID)s, %(POPYTYPE)s, %(POPYREG)s, %(POPYCOUN)s, %(POPYADMIN)s);
INSERT INTO Table002 (id, Col001, Col002, Col003, Col004, Col005, Col006) VALUES (%(xxxxxxxxxx)s, %(AREA)s, %(PERIMETER)s, %(CLPOINT_)s, %(CLPOINT_ID)s, %(CLPTLABEL)s, %(CLPTFLAG)s);
INSERT INTO Table002 (id, Col001, Col002) VALUES (%(xxxxxxxxxx)s, %(stretch_id)s, %(name)s);
INSERT INTO Table002 (id, Col001) VALUES (%(xxxxxxxxxx)s, %(stretch_id)s);
INSERT INTO Table002 (id, Col001, Col002) VALUES (%(xxxxxxxxxx)s, %(stretch_id)s, %(name)s);
INSERT INTO Table001 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008) VALUES (%(xxxxxxxxx)s, %(AREA)s, %(PERIMETER)s, %(PONET_)s, %(PONET_ID)s, %(POPYTYPE)s, %(POPYREG)s, %(POPYCOUN)s, %(POPYADMIN)s);
INSERT INTO Table001 (id, Col001, Col002, Col003) VALUES (%(xxxxx)s, %(type)s, %(value)s, %(code)s);
INSERT INTO Table001 (id, Col001, Col002) VALUES (%(xxxx)s, %(type)s, %(code)s);
INSERT INTO Table001 (id, Col001, Col002, Col003) VALUES (%(xxxxx)s, %(type)s, %(value)s, %(code)s);
INSERT INTO Table002 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008, Col009) VALUES (%(xxxxxxxxx)s, %(FNODE_)s, %(TNODE_)s, %(LPOLY_)s, %(RPOLY_)s, %(LENGTH)s, %(RDLINE_)s, %(RDLINE_ID)s, %(RDLNTYPE)s, %(RDLNSTAT)s);
INSERT INTO Table002 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008, Col009) VALUES (%(xxxxxxxxx)s, %(FNODE_)s, %(TNODE_)s, %(LPOLY_)s, %(RPOLY_)s, %(LENGTH)s, %(RDLINE_)s, %(RDLINE_ID)s, %(RDLNTYPE)s, %(RDLNSTAT)s);
INSERT INTO Table002 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008, Col009) VALUES (%(xxxxxxxxx)s, %(FNODE_)s, %(TNODE_)s, %(LPOLY_)s, %(RPOLY_)s, %(LENGTH)s, %(RDLINE_)s, %(RDLINE_ID)s, %(RDLNTYPE)s, %(RDLNSTAT)s);
INSERT INTO Table002 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008, Col009) VALUES (%(xxxxxxxxx)s, %(FNODE_)s, %(TNODE_)s, %(LPOLY_)s, %(RPOLY_)s, %(LENGTH)s, %(RDLINE_)s, %(RDLINE_ID)s, %(RDLNTYPE)s, %(RDLNSTAT)s);
INSERT INTO Table002 (id, Col001, Col002, Col003, Col004, Col005, Col006) VALUES (%(xxxxxxxxxx)s, %(AREA)s, %(PERIMETER)s, %(CLPOINT_)s, %(CLPOINT_ID)s, %(CLPTLABEL)s, %(CLPTFLAG)s);
INSERT INTO Table002 (id, Col001, Col002, Col003, Col004, Col005, Col006, Col007, Col008, Col009) VALUES (%(xxxxxxxxx)s, %(FNODE_)s, %(TNODE_)s, %(LPOLY_)s, %(RPOLY_)s, %(LENGTH)s, %(RDLINE_)s, %(RDLINE_ID)s, %(RDLNTYPE)s, %(RDLNSTAT)s);

Those queries are the results of the following test :

ERROR: test_transientdb.TestTransientTable.test_auto_transient_table
ERROR: test_transientdb.TestTransientTable.test_auto_transient_table_query
ERROR: test_transientdb.TestTransientTable.test_transient_joined_table
ERROR: test_transientdb.TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place
ERROR: test_transientdb.TestTransientTable.test_transient_joined_table_same_column_name
ERROR: test_transientdb.TestTransientTable.test_transient_joined_table_with_equal_column_names
ERROR: test_transientdb.TestTransientTable.test_transient_table
ERROR: test_transientdb.TestTransientTable.test_transient_table_query
ERROR: test_transientdb.TestTransientTable.test_transient_table_read_twice
ERROR: test_transientdb.TestTransientTable.test_transienttable_to_dbf
ERROR: test_load_0_8.TestJoinedTable.test
ERROR: test_save.SaveSessionTest.test_joined_table
ERROR: test_load_1_0.TestJoinedTable.test
ERROR: test_load.TestJoinedTable.test
ERROR: test_session.UnreferencedTablesTests.test_unreferenced_tables_with_joins
ERROR: test_load_0_9.TestJoinedTable.test


The python error is the following :

  File "/home/did/projets/python/thuban/thuban/test/../Thuban/Model/transientdb.py", line 431, in create
    cursor.execute(insert_template, row)
OperationalError: near "%": syntax error

I've added a print of the statement in case of an exception is raised.



----------------------------------------------------------------------

You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=105&aid=95&group_id=6




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)