When I use sqlalchemy using mysql-connector-python to read unicode from a blob I am getting:
Error closing cursorUnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 3: invalid start byte Now, I can solve this by doing , connect_args={'use_pure': True} to the create_engine. But that smells bad and I wanted to know the 'proper' way to do this; notably how do I put a Blob using SqlAlchemy? I have: my_blob = Column(BLOB, nullable=True) Does anyone know how to assign bytes the the above column? I assume my_object.my_blob = the_bytes however that does not work. Specifically, my Blob is of type `bytes` (I get it from a protobuff being serialized). Is there anything else I need to do? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/b5982571-7098-4bdd-8670-5102dd955ee1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.