You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?