I have mxDateTime installed for good reasons, and like the idea of queries coming back with mxDateTime objects, but there is a problem. When I have a date in MySQL with a value like '0000-00-00' (which MySQL accepts), I get an exception when trying to run a query:
_mysql.ProgrammingError: Query failed [('month out of range (1-12):
0',)]:
select * from tr_prod_attr_ch where prod_attr_id = 45 order by
choice_order_mysql.ProgrammingError: Query failed
Any thoughts on that?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My main thought is: What version of MySQLdb are you using? 0.9.0 should return illegal dates as None. You could also override the default type converter if you have an earlier version.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have mxDateTime installed for good reasons, and like the idea of queries coming back with mxDateTime objects, but there is a problem. When I have a date in MySQL with a value like '0000-00-00' (which MySQL accepts), I get an exception when trying to run a query:
_mysql.ProgrammingError: Query failed [('month out of range (1-12):
0',)]:
select * from tr_prod_attr_ch where prod_attr_id = 45 order by
choice_order_mysql.ProgrammingError: Query failed
Any thoughts on that?
My main thought is: What version of MySQLdb are you using? 0.9.0 should return illegal dates as None. You could also override the default type converter if you have an earlier version.