thank you for your help yes I installed psycopg2, and the problem is not about sqlalchemy version. the file config is :
# DATABASE CONFIGURATION #--------------------------------------------------------------------- # The DBMS name "Database management system" (example: mysql, postres) # DBMS= "oracle" DBMS= "postgres" #DBMS= "mysql" # Data base name db_name = "toto" # Badabase Host db_host = "localhost" # Data base connection port db_port = "5432" # postgres default port #db_port = "3306" # mysql default port # Data_base user_name #db_user = "root" db_user = "postgres" # Data_base password db_password= "" ********************************************************** the script to connect to a database are: import config connection_line = config.DBMS+'://'+config.db_user +':'+config.db_password+'@'+config.db_host+':'+config.db_port engine1 = create_engine(connection_line, echo=False) metadata = MetaData(engine1) conn = engine1.connect() try: if (config.DBMS=="postgres"): conn.execute('end;CREATE DATABASE ' + config.db_name, use_unicode=True) #metadata.create_all(bind=engine1) elif (config.DBMS=="mysql"): conn.execute('CREATE DATABASE ' + config.db_name, use_unicode=True) else: print "ERROR: The DBSM in config.py doesn't exist." exit() except Exception, e: print 'Error on creation the database: '+config.db_name print e exit() ************************************************ the eroor is: File "createdb.py", line 20, in ? conn = engine1.connect() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/engine/base.py", line 1134, in connect return Connection(self, **kwargs) File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/engine/base.py", line 527, in __init__ self.__connection = connection or engine.raw_connection() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/engine/base.py", line 1189, in raw_connection return self.pool.unique_connection() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/pool.py", line 136, in unique_connection return _ConnectionFairy(self).checkout() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/pool.py", line 291, in __init__ rec = self._connection_record = pool.get() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/pool.py", line 171, in get return self.do_get() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/pool.py", line 576, in do_get con = self.create_connection() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/pool.py", line 139, in create_connection return _ConnectionRecord(self) File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/pool.py", line 199, in __init__ self.connection = self.__connect() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/pool.py", line 252, in __connect connection = self.__pool._creator() File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0-py2.4.egg/ sqlalchemy/engine/strategies.py", line 77, in connect raise exceptions.DBAPIError.instance(None, None, e) sqlalchemy.exceptions.OperationalError: (OperationalError) FATAL: Ident authentication failed for user "postgres" None None --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---