Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with sqlparse 0.2 #989

Closed
Mariatta opened this issue Aug 13, 2016 · 1 comment
Closed

Issue with sqlparse 0.2 #989

Mariatta opened this issue Aug 13, 2016 · 1 comment

Comments

@Mariatta
Copy link
Member

I followed instructions in https://pythondotorg.readthedocs.io/install.html

I then started my development server using manage.py runserver

When I opened my browser, I saw the following error.

Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Internal Server Error: /
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/django/core/handlers/base.py", line 204, in get_response
    response = middleware_method(request, response)
  File "/usr/local/lib/python3.4/site-packages/debug_toolbar/middleware.py", line 89, in process_response
    new_response = panel.process_response(request, response)
  File "/usr/local/lib/python3.4/site-packages/debug_toolbar/panels/sql/panel.py", line 187, in process_response
    query['sql'] = reformat_sql(query['sql'])
  File "/usr/local/lib/python3.4/site-packages/debug_toolbar/panels/sql/utils.py", line 28, in reformat_sql
    return swap_fields(''.join(stack.run(sql)))
  File "/usr/local/lib/python3.4/site-packages/sqlparse/engine/filter_stack.py", line 29, in run
    stream = filter_.process(stream)
TypeError: process() missing 1 required positional argument: 'stream'
[12/Aug/2016 14:47:54] "GET / HTTP/1.1" 500 101972

I googled the error message, and came across this issue django-commons/django-debug-toolbar#856

One of the suggestion there was to add sqlparse <0.2 into requirements.txt

I did that and now the page can be loaded.

Perhaps related to #987

@berkerpeksag
Copy link
Member

I'd prefer avoiding adding an indirect dependency to requirements.txt. But since we can't upgrade django-debug-toolbar to 1.5 (it requires Django 1.8+), I'd be +1 on adding sqlparse < 0.2 into requirements.txt as an interim solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants