Re: [sqlalchemy] SQLAlchemy cant convert boolean to int with mysql

2013-10-28 Thread Gustavo Gawryszewski
Great! I've figure out what was wrong. I had few columns with the wrong type. What was funny was that it worked without the C Extensions, I would guess that it's because any int above 0 means true too python so the conversion works. On Mon, Oct 28, 2013 at 2:06 PM, Michael Bayer wrote: > > the qu

Re: [sqlalchemy] SQLAlchemy cant convert boolean to int with mysql

2013-10-28 Thread Michael Bayer
the quickest route would be to use DEBUG logging or echo=debug which will show the rows coming back. or I’d just stick a pdb.set_trace() and/or pdb.post_mortem() in the source of your app or SQLalchemy and poke from there when the error occurs. On Oct 28, 2013, at 10:43 AM, Gustavo Gawryszews

Re: [sqlalchemy] SQLAlchemy cant convert boolean to int with mysql

2013-10-28 Thread Gustavo Gawryszewski
Is there a way to force sqlalchemy to print out which is the result that is breaking the system? On Mon, Oct 28, 2013 at 12:40 PM, Michael Bayer wrote: > it seems apparent that data that isn’t in the range (None, 0, 1) is getting > into that column, that’s the part you’d need to fix. > > Or make

Re: [sqlalchemy] SQLAlchemy cant convert boolean to int with mysql

2013-10-28 Thread Michael Bayer
it seems apparent that data that isn’t in the range (None, 0, 1) is getting into that column, that’s the part you’d need to fix. Or make yourself a custom type that interprets whatever number it is you’re putting in there as a boolean. On Oct 28, 2013, at 10:34 AM, Gustavo Gawryszewski wrote

Re: [sqlalchemy] SQLAlchemy cant convert boolean to int with mysql

2013-10-28 Thread Gustavo Gawryszewski
Well, it happened again after i've added some data to my database. I'm using sqlalchemy 0.8.3 and pymysql 0.6.1. (I have also tried with mysql-python 1.2.4) On Fri, Oct 25, 2013 at 3:33 PM, Michael Bayer wrote: > > On Oct 25, 2013, at 12:59 PM, Gustavo Gawryszewski > wrote: > > > I've got an er

Re: [sqlalchemy] SQLAlchemy cant convert boolean to int with mysql

2013-10-25 Thread Michael Bayer
On Oct 25, 2013, at 12:59 PM, Gustavo Gawryszewski wrote: > > I've got an error while trying to retrieve boolean items from mysql. > > as stated in > http://stackoverflow.com/questions/19591801/sqlalchemy-cant-convert-boolean-to-int-with-mysql > > but when I've installed without the C Exten

[sqlalchemy] SQLAlchemy cant convert boolean to int with mysql

2013-10-25 Thread Gustavo Gawryszewski
I've got an error while trying to retrieve boolean items from mysql. as stated in http://stackoverflow.com/questions/19591801/sqlalchemy-cant-convert-boolean-to-int-with-mysql but when I've installed without the C Extensions everything worked fine. Is that a bug? -- You received this messag