I am trying to convert the SQL command select * from chart where abs(jupiter_lon-h5_lon) < 0.88 into SQLAlchemy:
db.session.query(Chart).filter(abs(Chart.jupiter_lon - Chart.h5_lon) < 0.88).all()
but I'm getting the error: TypeError: bad operand type for abs(): 'BinaryExpression' - which I don't understand. What's wrong here?