[sqlalchemy] UnicodeEncodeError on saving to MySQL

2011-09-29 Thread Benjamin Sims
I've recently moved from SQLite to MySQL as the underlying database for my application. The move is causing me various problems, principally around Unicode. I *think* they were not occurring when SQLite was there, so I thought I would ask if anybody on the list has had similar problems. My

Re: [sqlalchemy] UnicodeEncodeError on saving to MySQL

2011-09-29 Thread Benjamin Sims
File scraper.py, line 77, in run session.commit() File /home/benjamin/test/test1/lib/python2.6/site-packages/SQLAlchemy-0.7.2-py2.6-linux-x86_64.egg/sqlalchemy/orm/session.py, line 617, in commit self.transaction.commit() File

Re: [sqlalchemy] UnicodeEncodeError on saving to MySQL

2011-09-29 Thread Michael Bayer
OK strange, MySQLdb is attempting to run an ascii encoder on a string (which is likely already a string, not a unicode).Try ensuring that MySQLdb isn't anticipating Python unicode objects, using a connection form as: