Appears to be incompatible with sqlparse version 0.2.0.
See original GitHub issueI get the following exception and stack trace on every page I try to view:
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
223. response = middleware_method(request, response)
File "/usr/local/lib/python2.7/dist-packages/debug_toolbar/middleware.py" in process_response
129. panel.generate_stats(request, response)
File "/usr/local/lib/python2.7/dist-packages/debug_toolbar/panels/sql/panel.py" in generate_stats
192. query['sql'] = reformat_sql(query['sql'])
File "/usr/local/lib/python2.7/dist-packages/debug_toolbar/panels/sql/utils.py" in reformat_sql
27. return swap_fields(''.join(stack.run(sql)))
File "/usr/local/lib/python2.7/dist-packages/sqlparse/engine/filter_stack.py" in run
29. stream = filter_.process(stream)
Exception Type: TypeError at /admin/mediasources/document/
Exception Value: process() takes exactly 3 arguments (2 given)
I can workaround by forcing the version to 0.1.19 via sqlparse==0.1.19 in the requirements file.
sqlparse 0.2.0 was released today
Issue Analytics
- State:
- Created 7 years ago
- Reactions:22
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Changes in python-sqlparse - Read the Docs
Release 0.2.0 (Jul 20, 2016)¶. IMPORTANT: The supported Python versions have changed with this release. sqlparse 0.2.x supports Python 2.7 and Python >=...
Read more >django-debug-toolbar breaking on admin while getting sql ...
sqlparse latest version was released today and it's not compatible with django-debug-toolbar version 1.4, Django version 1.9.
Read more >Django, Djongo and SQLParse dependency
4 version. As expected I got an error saying that my environment will be inconsistent due to Django 3.0.3 requiring the sqlparse 0.3.1...
Read more >sqlparse 0.2.0
pip install sqlparse==0.2.0 ... Newer version available (0.4.3) ... the internal representation looks like: >>> stmt.tokens (<DML 'select' at 0x9b63c34>, ...
Read more >python-sqlparse Documentation
python-sqlparse Documentation, Release 0.4.4.dev0 ... with other dialects and doesn't seem to be widely used (issue476).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Maybe also update minimum version of sqlparse>=0.2.0 in setup.py?
If someone feels like investigating how to update the DDT to work with sqlparse 0.2.0 that would be even better 😃