Minor bug in error reporting

Issue #2322 resolved
Former user created an issue

When tuple is passed to query() method I get the error:

  File "sqlalchemy/orm/query.py", line 3062, in __init__
    "expected - got '%r'" % column
TypeError: not all arguments converted during string formatting

The fix is simple, just use single item tuple as right operand:

    "expected - got '%r'" % (column,)

Comments (3)

  1. Log in to comment