Hi, I am trying to build an application using sqlalchemy.
in principle i have the structure #============================================== from sqlalchemy import * from sqlalchemy.orm import * metadata = MetaData('sqlite://') a_table = Table('tf_lehrer', metadata, Column('id', Integer, primary_key=True), Column('Kuerzel', Text), Column('Name', Text)) A_class = Class(object): def __init__(self, Kuerzel, Name) self.Kuerzel=Kuerzel self.Name=Name mapper(A_class, a_table) A_record = A_class('BUM', 'Bäumer') Session = sessionmaker() session = Session() session.add(A_record) session.flush() #================================================ At this time it runs to the line session.flush() where i get the following errormessage: sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. u'INSERT INTO tf_lehrer ("Kuerzel", "Name") VALUES (?, ?)' ('BUM', 'B\xc3\xa4umer') but where can i switch my application to Unicode strings? Thank you for all hints Wolfgang -- http://mail.python.org/mailman/listinfo/python-list