Re: [sqlalchemy] SQLite: OperationalError when decoding 0x92 in TEXT column

2014-02-09 Thread Erich Blume
Thanks for the help on this, everyone! I found two ways to deal with this and figured I should share in case it comes up in the future. The first approach, the one I went with (because in my case, fidelity was not as important) was to alter the 'text_factory' the sqlite3 uses. One trick here was

Re: [sqlalchemy] SQLite: OperationalError when decoding 0x92 in TEXT column

2014-02-09 Thread Michael Bayer
On Feb 9, 2014, at 5:34 AM, Erich Blume blume.er...@gmail.com wrote: Then, you have to tell SQLAlchemy to convert these strings to unicode. I did not persue this approach far enough to find the right set of arguments but I imagine this would be very simple - set 'force_unicode' to True, I

Re: [sqlalchemy] SQLite: OperationalError when decoding 0x92 in TEXT column

2014-02-06 Thread Erich Blume
Hmm, this one has me stumped. As best I can tell after poking at it using the column_reflect event, a custom dialect, etc. - the issue here is that in pysqlite.py we (in my Python 3.3 install) are selecting `sqlite3.dbapi2` as the dbapi interface, but we aren't telling sqlite3 anything about

Re: [sqlalchemy] SQLite: OperationalError when decoding 0x92 in TEXT column

2014-02-06 Thread Michael Bayer
On Feb 6, 2014, at 6:59 PM, Erich Blume blume.er...@gmail.com wrote: Hmm, this one has me stumped. As best I can tell after poking at it using the column_reflect event, a custom dialect, etc. - the issue here is that in pysqlite.py we (in my Python 3.3 install) are selecting

Re: [sqlalchemy] SQLite: OperationalError when decoding 0x92 in TEXT column

2014-02-04 Thread Erich Blume
Thanks Simon, Do you know how I might use that with reflection? There's several hundred of these columns, I'd hate to have to override each one individually - that sort of defeats the purpose of reflection. One thought I just had was perhaps I could subclass the Text type and then override the

Re: [sqlalchemy] SQLite: OperationalError when decoding 0x92 in TEXT column

2014-02-04 Thread Simon King
I've not done much with reflection, but perhaps you could use the column_reflect event: http://docs.sqlalchemy.org/en/rel_0_8/core/events.html#sqlalchemy.events.DDLEvents.column_reflect Simon On Tue, Feb 4, 2014 at 11:28 AM, Erich Blume blume.er...@gmail.com wrote: Thanks Simon, Do you