I've recently come across a problem where SQLAlchemy was tossing an error when querying on mssql tables that had a datetime2 type. The error was this:
File "sqlalchemy\types.py", line 1361, in adapt return impltype(timezone=self.timezone) AttributeError: 'DATETIME2' object has no attribute 'timezone' I dug around and it looks like the mssql type DATETIME2 doesn't properly initialize its parents classes so the self.timezone value is never created it. For me the fix was simply to add the following line to the DATETIME2 init method: super(DATETIME2, self).__init__(**kwargs) I'm not sure if this is a known bug or not, so I hope this can help somebody out if they run into the same problem. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
