[Zope-DB] Postgres + PgSQL

Jean Pierre Litsas Jean Pierre Litsas" <pierre@ods.com.br
Sun, 4 Nov 2001 16:24:10 -0300


Hi,

I am using Zope 2.4.2 to calling a external method to select some rows in
PostgreSQL 7.1.3, this external method use PgSQL 1.6 and   i am having this
error :
Error Type: AttributeError
Error Value: 'PgSQL' module has no attribute 'connect'


 The same script works OK if is called from command prompt but with Zope
not.

My system to work with Zope:

Zope Version:  (Zope 2.4.2 (binary release, python 2.1, linux2-x86), python
2.1.0, linux2)
Python Version: 2.1 (#2, Jun 22 2001, 10:20:42) [GCC 2.7.2.3]
System Platform: linux2
RedHat 7.2
PostgreSQL 7.1.3
PgSQL 1.6
egenix-mx-base-2.0.2

To command prompt:
RedHat 7.2
PostgreSQL 7.1.3
PgSQL 1.6
egenix-mx-base-2.0.2
Python2: Python 2.1.1 (#1, Aug 13 2001, 19:37:40) [GCC 2.96 20000731 (Red
Hat Linux 7.1 2.96-96)] on linux2

My script:

import sys
import PgSQL

def test( ):
    cnx=PgSQL.connect(database='GDigital',user='postgres')
    cur=cnx.cursor()
    cue.execute("SELECT * FROM caduser")
    cur.close()
    del cnx
    return '%s' % 0

if __name__ = '__main__':
    test()

Thanks.
Pierre.
Sao Paulo - Brazil