Merge pull request #419 from yuyiguo/sqlalchemy-0.9

change to new sqlalchemy(0.9) exceptions