I understand the error but I can't understand where it's coming from.
I have this query which returns a row from the DB:
test = DBSession.query(TTransformerTurnsRatio).filter(TTransformerTurnsRatio.ixSubReport == sub_rep_id).first()
This is what my table looks like:

How am I getting a TypeError exception here? I'm lost.
intyou'll need to cast it into a stringstr(sub_rep_id)so the types in the equality statement match