The exact exception is: `TypeError: not all arguments converted during
string formatting`
The exception seems due to the `sql_with_params` method of
`django.db.models.sql.Query` duplicating the `params` one time too many :
a `print(params)` at line 257 in django/db/models/sql/query.py outputs
`(('10',), ('10',), ('10',))`, while the query has only two placeholders.
I'm running Django 2.2.6
--
Ticket URL: <https://code.djangoproject.com/ticket/31058>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Simon Charette):
Could you try reproducing against the recently released 3.0 version, I
vaguely remember a similar issue that was addressed in the past weeks.
--
Ticket URL: <https://code.djangoproject.com/ticket/31058#comment:1>
* status: new => closed
* version: 2.2 => master
* resolution: => duplicate
Comment:
Executing this query in Django 2.2 fails with
{{{
django.db.utils.ProgrammingError: syntax error at or near "WHERE"
LINE 4: ... WHERE id IN (10)) AS "score", WHERE id I...
}}}
but it was fixed in 567b9928a3ad37e95b9ae17ec41342daa6968739.
I cannot reproduce `TypeError` when calling `print(queryset.query)`. I
think we can mark this as a duplicate of #29692.
--
Ticket URL: <https://code.djangoproject.com/ticket/31058#comment:2>