[SQLObject] "unrecognized token" when using SQLite
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Mike H. <th...@bi...> - 2003-05-02 19:17:52
|
I'm sure this is really a problem with SQLite or PySQLite, but since I'm
using SQLObject . . . .
When I try to insert a value into SQLite, I get the following message:
File "/usr/lib/python2.2/site-packages/SQLObject/SQLObject.py", line
713, in new
inst._SO_finishCreate()
File "/usr/lib/python2.2/site-packages/SQLObject/SQLObject.py", line
733, in _SO_finishCreate
names, values)
File "/usr/lib/python2.2/site-packages/SQLObject/DBConnection.py", line
128, in queryInsertID
return self._runWithConnection(self._queryInsertID, table, idName,
names, values)
File "/usr/lib/python2.2/site-packages/SQLObject/DBConnection.py", line
72, in _runWithConnection
val = meth(conn, *args)
File "/usr/lib/python2.2/site-packages/SQLObject/DBConnection.py", line
497, in _queryInsertID
c.execute(q)
File "/usr/lib/python2.2/site-packages/sqlite/main.py", line 247, in
execute
self.rs = self.con.db.execute(SQL)
_sqlite.DatabaseError: unrecognized token: ":"
I edited the DBConnection.py to print out the SQL statement before
running it -- that statement it:
INSERT INTO site_data (category, link, description, title, date,
site_id) VALUES ('tech', 'http://slashdot.org/article.pl?sid=03/05/02/1645224', 'Smaz writes "Apparently Carnegie Mellon has set up a Hall of Fame for robots and their inventors. Wonder if it\'ll have the pull of a RnR Hall of Fame or
...', 'Robot Hall of Fame', '2003-05-02T18:15:48+00:00', 1)
I'm not sure what ":" in the statement SQLite doesn't like . . . I can
use the same data with PostgreSQL.
If you could shed any light on this, I'd really appreciate it.
-- mikeh
--
|