[Twisted-Python] twisted.enterprise problem

Stephen Figgins fig at monitor.net
Mon Apr 14 17:20:19 MDT 2003


I am using Twisted CVS and pyPgSQL 2.3, attempting to create a dbpool 
with the line:

dbpool = adbapi.ConnectionPool("pyPgSQL", host='localhost', user='fig', 
db='fig')

When I try to run it I get this traceback:

[fig at dawa dsi]$ python pbcontact.py
Traceback (most recent call last):
   File "pbcontact.py", line 19, in ?
     dbpool = adbapi.ConnectionPool("PgSQL", host='localhost', 
user='fig', db='fig')
   File "/usr/lib/python2.2/site-packages/twisted/enterprise/adbapi.py", 
line 53, in
__init__
     self.dbapi = reflect.namedModule(dbapiName)
   File "/usr/lib/python2.2/site-packages/twisted/python/reflect.py", 
line 406, in namedModule
     topLevel = __import__(name)
ImportError: No module named PgSQL
[fig at dawa dsi]$ python pbcontact.py
Traceback (most recent call last):
   File "pbcontact.py", line 19, in ?
     dbpool = adbapi.ConnectionPool("pyPgSQL", host='localhost', 
user='fig', db='fig')
   File "/usr/lib/python2.2/site-packages/twisted/enterprise/adbapi.py", 
line 54, in
__init__
     assert self.dbapi.apilevel == '2.0', 'DB API module not DB API 2.0 
compliant.'
AttributeError: 'module' object has no attribute 'apilevel'
[fig at dawa dsi]$


Any ideas?


-Stephen





More information about the Twisted-Python mailing list