I am new to Sqlalchemy and started to check it with the tutorial. The database I have to use is Informix (10.3). But with that database I get the "TypeError: __init__() got multiple values for keyword argument 'column_keys'" Exception Traceback below. Using Postgres it runs fine.
Any idea for a work-around or fix? Thanks, Bernd ----------- Here is what I copied from the tutorial so far ---------------------- import sqlalchemy from sqlalchemy import create_engine #no Exception with this engine #engine = create_engine('postgres://bernd:[EMAIL PROTECTED]/testdb',echo=True) engine = create_engine('informix://bernd:[EMAIL PROTECTED]/testdb',echo=True) from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey metadata = MetaData() users_table = Table('users', metadata, Column('id', Integer, primary_key=True), Column('name', String(40)), Column('fullname', String(100)), Column('password', String(15)) ) metadata.create_all(engine) class User(object): def __init__(self, name, fullname, password): self.name = name self.fullname = fullname self.password = password def __repr__(self): return "<User('%s','%s', '%s')>" % (self.name, self.fullname, self.password) from sqlalchemy.orm import mapper mapper(User, users_table) ed_user = User('ed', 'Ed Jones', 'edspassword') from sqlalchemy.orm import sessionmaker Session = sessionmaker(bind=engine, autoflush=True, transactional=True) session = Session() session.save(ed_user) session.commit() ------------- Exception thrown when Informix is used ----------------------------------- Traceback (most recent call last): File "tutorial.py", line 43, in <module> session.commit() File "C:\Python25\lib\site-packages\sqlalchemy-0.4.3-py2.5.egg\sqlalchemy\orm\session.py", line 544, in commit self.transaction.commit() File "C:\Python25\lib\site-packages\sqlalchemy-0.4.3-py2.5.egg\sqlalchemy\orm\session.py", line 250, in commit self._prepare_impl() File "C:\Python25\lib\site-packages\sqlalchemy-0.4.3-py2.5.egg\sqlalchemy\orm\session.py", line 234, in _prepare_impl self.session.flush() File "C:\Python25\lib\site-packages\sqlalchemy-0.4.3-py2.5.egg\sqlalchemy\orm\session.py", line 764, in flush self.uow.flush(self, objects) File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\orm\unitofwork.py", line 215, in flush flush_context.execute() File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\orm\unitofwork.py", line 437, in execute UOWExecutor().execute(self, tasks) File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\orm\unitofwork.py", line 927, in execute self.execute_save_steps(trans, task) File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\orm\unitofwork.py", line 942, in execute_save_steps self.save_objects(trans, task) File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\orm\unitofwork.py", line 933, in save_objects task.mapper._save_obj(task.polymorphic_tosave_objects, trans) File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\orm\mapper.py", line 1106, in _save_obj c = connection.execute(statement.values(value_params), params) File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\engine\base.py", line 846, in execute return Connection.executors[c](self, object, multiparams, params) File "c:\python25\lib\site-packages\SQLAlchemy-0.4.3-py2.5.egg\sqlalchemy\engine\base.py", line 897, in execute_clauseelement return self._execute_compiled(elem.compile(dialect=self.dialect, column_keys=keys, inline=len(params) > 1), distilled_params=params) File "C:\Python25\lib\site-packages\sqlalchemy-0.4.3-py2.5.egg\sqlalchemy\sql\expression.py", line 1043, in compile compiler = dialect.statement_compiler(dialect, self, column_keys=column_keys, inline=inline) File "C:\Python25\lib\site-packages\sqlalchemy-0.4.3-py2.5.egg\sqlalchemy\databases\informix.py", line 374, in __init__ compiler.DefaultCompiler.__init__( self , dialect , statement , parameters , **kwargs ) TypeError: __init__() got multiple values for keyword argument 'column_keys' --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
begin:vcard fn:Bernd Zimmermann n:Zimmermann;Bernd org:it-consulting adr:;;Alter Postweg 104 D;Seevetal - Horst;;21220;Germany email;internet:[EMAIL PROTECTED] tel;work:+49 4105 668033 tel;fax:+49 4105 668032 tel;cell:+49 170 4735471 x-mozilla-html:FALSE url:www.zedv.de version:2.1 end:vcard