[Zope-DB] Trying Psycopg

"Ricardo L. A. Bánffy" rbanffy@utopia.com.br
Wed, 24 Jul 2002 00:49:07 -0300


Hi.

I am having a problem that has been reported before (I am sure it is a 
FAQ, but it doesn't seem to be a Frequently Answered one ;-) )

On October, 2001, Craig Ching had the same problem I am having now, but 
's fix seem not to fit.

Everything configured (after the lenghty enchantment ./configure 
--with-python=/opt/zope_stable/bin/python --with-zope=/opt/zope_stable/ 
--with-postgres-includes=/usr/include/postgresql/ 
--with-mxdatetime-includes=/usr/include/python2.1/mx/), made, made 
installed and made install-zope'ed fine, but the same error seems to exist:

<from the product screen>
Traceback (most recent call last):
   File "/opt/zope_stable/lib/python/OFS/Application.py", line 531, in 
import_product
     product=__import__(pname, global_dict, global_dict, silly)
   File "/opt/zope_stable/lib/python/Products/ZPsycopgDA/__init__.py", 
line 92, in ?
     import DA
   File "/opt/zope_stable/lib/python/Products/ZPsycopgDA/DA.py", line 
92, in ?
     from db import DB
   File "/opt/zope_stable/lib/python/Products/ZPsycopgDA/db.py", line 
99, in ?
     import psycopg
AttributeError: 'DateTime' module has no attribute 'mxDateTimeAPI'
</from the product screen>

<from the stupid log>
Traceback (innermost last):
   File /opt/zope_stable/lib/python/OFS/Application.py, line 531, in 
import_product
   File /opt/zope_stable/lib/python/Products/ZPsycopgDA/__init__.py, 
line 92, in ?
   File /opt/zope_stable/lib/python/Products/ZPsycopgDA/DA.py, line 92, in ?
   File /opt/zope_stable/lib/python/Products/ZPsycopgDA/db.py, line 99, in ?
AttributeError: 'DateTime' module has no attribute 'mxDateTimeAPI'
</from the stupid log>

I even tried to ln -s the psycopgmodule.so to the lib-dynload folder as 
another workaround suggested.

Has anyone successfully installed psycopg 1.0.10 under Zope 2.5.1?

Couldn't we just integrate adapters for PostgreSQL and MySQL (and ODBC 
under Windows) in the main Zope core so such mishaps could be avoided?