I'm probably missing something very simple. :-)
SQLObject from the SVN (but also 0.12), psycopg2 2.0.13, Python 2.5,
Postgresql 8.4.2 on a Debian sid.

Test code:
===================================================
from sqlobject import *

connection = connectionForURI('postgres://root:q1w...@localhost
/imdb?charset=UTF-8')

class TestTableName(SQLObject):
    testColName = StringCol()

TestTableName.setConnection(connection)
TestTableName.createTable(True)
===================================================


Error:
===================================================
Traceback (most recent call last):
  File "./pino", line 13, in <module>
    TestTableName.createTable(True)
  File
"/home/da/develop/lib/python2.5/site-packages/SQLObject-0.13dev_r4066-py2.5.egg/sqlobject/main.py",
line 1404, in createTable
    if ifNotExists and cls.tableExists(connection=conn):
  File
"/home/da/develop/lib/python2.5/site-packages/SQLObject-0.13dev_r4066-py2.5.egg/sqlobject/main.py",
line 1378, in tableExists
    return conn.tableExists(cls.sqlmeta.table)
  File
"/home/da/develop/lib/python2.5/site-packages/SQLObject-0.13dev_r4066-py2.5.egg/sqlobject/postgres/pgconnection.py",
line 191, in tableExists
    % self.sqlrepr(tableName))
  File
"/home/da/develop/lib/python2.5/site-packages/SQLObject-0.13dev_r4066-py2.5.egg/sqlobject/dbconnection.py",
line 392, in queryOne
    return self._runWithConnection(self._queryOne, s)
  File
"/home/da/develop/lib/python2.5/site-packages/SQLObject-0.13dev_r4066-py2.5.egg/sqlobject/dbconnection.py",
line 260, in _runWithConnection
    conn = self.getConnection()
  File
"/home/da/develop/lib/python2.5/site-packages/SQLObject-0.13dev_r4066-py2.5.egg/sqlobject/dbconnection.py",
line 271, in getConnection
    conn = self.makeConnection()
  File
"/home/da/develop/lib/python2.5/site-packages/SQLObject-0.13dev_r4066-py2.5.egg/sqlobject/postgres/pgconnection.py",
line 139, in makeConnection
    conn.query("SET client_encoding TO %s" % dbEncoding)
AttributeError: 'psycopg2._psycopg.connection' object has no attribute
'query'
===================================================



Thanks in advance!
-- 
Davide Alberani <d...@mimante.net>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to