ok, i installed the rpm version of psycopg2 and web2py recognizes it when i 
run "python web2py.py".  i then added a very simple application under the 
admin interface and added only:

db = DAL('postgres:psycopg2://postgres:password@localhost/testbank')

to the db.py file.  when i run the "database administration" button, i get 
the error:

Traceback (most recent call last):
  File "/opt/web-apps/web2py/gluon/dal.py", line 5955, in __init__
    self._adapter = ADAPTERS[self._dbname](*args)
  File "/opt/web-apps/web2py/gluon/dal.py", line 2010, in __init__
    self.pool_connection(connect)
  File "/opt/web-apps/web2py/gluon/dal.py", line 465, in pool_connection
    self.connection = f()
  File "/opt/web-apps/web2py/gluon/dal.py", line 2009, in connect
    return self.driver.connect(msg,**driver_args)
  File "/usr/lib64/python2.6/site-packages/psycopg2/__init__.py", line 179, in 
connect
    connection_factory=connection_factory, async=async)
OperationalError: FATAL:  Ident authentication failed for user "postgres"


BUT, BUTTE, psql is totally working and accessing the postgresql service and 
testbank database for the "postgres" user with "trust" or "md5" set to the 
local under pg_hba.conf file and using the proper password.


also under python native:

import psycopg2
conn = psycopg2.connect('dbname=testbank user=postgres password=password')

works fine also with no issues and conn shows a proper connection object.  
so damn, even the psycopg2 driver is working either.

lucas

Reply via email to