question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appears to be incompatible with sqlparse version 0.2.0.

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Reactions:22
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
browniebrokecommented, Jul 20, 2016

Maybe also update minimum version of sqlparse>=0.2.0 in setup.py?

1reaction
aaugustincommented, Jul 20, 2016

If someone feels like investigating how to update the DDT to work with sqlparse 0.2.0 that would be even better 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found