Closed
Description
When a byte-string SQL query is run, e.g. those produced by psycopg2.execute_values
, I get the error TypeError: startswith first arg must be bytes or a tuple of bytes, not str
.
This seems to be a result of line 142 in django-debug-toolbar/debug_toolbar/panels/sql/tracking.py
: 'is_select': sql.lower().strip().startswith('select')
since 'select' is unicode.
Flask-debugtoolbar addressed this with prefix = b'select' if isinstance(statement, bytes) else 'select'
- would that work in this case?
Metadata
Metadata
Assignees
Labels
No labels