Solved the unicode issue: had to convert query to UTF-8. However: may want instead to set pymysql connection to unicode or not-unicode and see whether that works better. Not getting query results, even though at least the unicode error isn't happening any more.