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

TypeError: process() takes exactly 3 arguments (2 given) #862

Closed
narrowfail opened this issue Jul 25, 2016 · 2 comments
Closed

TypeError: process() takes exactly 3 arguments (2 given) #862

narrowfail opened this issue Jul 25, 2016 · 2 comments

Comments

@narrowfail
Copy link

Hello, had to shut down django-debug-toolbar due this error:

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/core/model/list/

Django Version: 1.9.7
Python Version: 2.7.9
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'debug_toolbar',
 'django_countries',
 'sorl.thumbnail',
 'rest_framework',
 'widget_tweaks',
 'bootstrap_pagination',
 'apps.core',
 'apps.users',
 'apps.landing']
Installed Middleware:
[u'debug_toolbar.middleware.DebugToolbarMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware']



Traceback:

File "/dir/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  235.                 response = middleware_method(request, response)

File "/dir/venv/local/lib/python2.7/site-packages/debug_toolbar/middleware.py" in process_response
  129.                 panel.generate_stats(request, response)

File "/dir/venv/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/panel.py" in generate_stats
  192.                     query['sql'] = reformat_sql(query['sql'])

File "/dir/venv/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/utils.py" in reformat_sql
  27.     return swap_fields(''.join(stack.run(sql)))

File "/dir/venv/local/lib/python2.7/site-packages/sqlparse/engine/filter_stack.py" in run
  29.             stream = filter_.process(stream)

Exception Type: TypeError at /core/model/list/
Exception Value: process() takes exactly 3 arguments (2 given)

PIP:

Django==1.9.7
django-bootstrap-pagination==1.6.1
django-countries==3.4.1
django-debug-toolbar==1.4
django-filter==0.13.0
django-widget-tweaks==1.4.1
djangorestframework==3.4.0
Markdown==2.6.6
Pillow==3.3.0
PyMySQL==0.7.5
sorl-thumbnail==12.3
sqlparse==0.2.0
wheel==0.24.0

@aaugustin
Copy link
Contributor

Upgrade the debug toolbar to 1.5 or downgrade sqlparse to 0.1.x.

There's a bunch of duplicates of this ticket if you need more info.

@narrowfail
Copy link
Author

Thanks!

hburgund added a commit to roundware/roundware-server that referenced this issue Aug 9, 2016
…go 1.9. django-commons/django-debug-toolbar#862 - this issue only impacted dev/vagrant deployments, not production.
scottx611x added a commit to refinery-platform/refinery-platform that referenced this issue Dec 13, 2016
scottx611x added a commit to refinery-platform/refinery-platform that referenced this issue Dec 20, 2016
* Django 1.7 now supports `SessionAuthenticationMiddleware`

* `admin.autodiscover()` is now called automatically

* Update requirements

* Change admin display entry

* Remove usage of `south`

* Refactor per deprecation of `get_profile()`

* Update migrations for Django 1.7 compatability

* Utilize new related_name `profile`

* Refactor `get_profile` use in html files too

* Add migration to remove fields that should be abstracted

* Ad public group in a data migration (helpful for testing)

* Add `ANONYMOUS_USER_NAME = None` for Django 1.7 compatibility

* Refactor tests now that the public group is available to us

* Add per django docs suggestion

* `tasty-pie` v0.13.3 was causing problems but our current version still supports django 1.7

* Adjust travis.yml and init.pp

* Remove unnecessary individual migrations

* Fix migration dependency created before the move to `registration-redux`

* Re-add missing `require`

* Manually call `django.steup()` due to how Django 1.7 handles the AppRegistry

* Remove unnecessary puppet step

* Refactor HttpResponses that returned son to JsonResponse

* Load default users from single fixture

* Guest shouldn't be a `superuser` or `staff`

* Convert annotation_server's `initial_data` into a data migration

* Utilize new related name `profile`

* Update deployment scripts to use `migrate` over `synced`

* Remove unnecessary setting

* Revert "Refactor HttpResponses that returned son to JsonResponse"

This reverts commit 836901c.

* Remove usages of `mimetype` in favor of `content_type`

* Remove unnecessary setting

* Update user creation

* Celery can't properly serialize Django 1.7 model instances, so return uuid's from file_store tasks instead

* Refactor usages of file_store tasks that expected a model instance returned

* bump anyjson version to what kombu wants

* refactor to utilize UUIDs returned from celery tasks

* Explicitly define `DJANGO_SETTINGS_MODULE` due to Django 1.7 `django.setup()` behavior

* Squash migrations

* Data migration should be separate from initial

* initial migration shouldn't include new schema changes from Django 1.7 upgrade

* Remove duplicate entry in `list_display`

* Refactor newly introduced user creation due to aws deployment depending on superuser fixture

* Remove unnecessary file_store tasks and refactor accordingly

* Update manage.py

* move location of django.setup()

* Explicitly set DJANGO_SETTINGS_MODULE

* Update missed migration and fix manually edited one

* Update fabfile

* Revert accidental removal

* Grab env var rather than hardcoding it

* Update manage.py and wsgi.py to what the django 1.7  `start_project` management command creates

* Refactor existing mgmt. command to add all users to the Public Group
Django's loaddata mgmt. command does not trigger the User model's save() method so no post_save signals are triggered

* Remove redundant `require`s

* Adjust post_save to add all saved users to Public Group

* Set ANONYMOUS_USER_NAME

* Remove dependance on read task

* Guardian already provides this as a default value

* Address issue where ANONYMOUS_USER wasn't automatically created

* Preserve "deconstructability" of TemporaryResource and ManageableResource

* Update comment

* Revert introduction of neo4J key since this has been done in `develop`

* Update initial migration created from the changes made in PR #1515

* Update data migration to reflect removed field

* Remove method and field here as well  to avoid conflicts

* Remove `--fake` command introduced into fabric

* Scottx611x/django 1.7 upgrade storage fix (#1543)

* Allow `SymlinkedFileSystemStorage` to be settings-agnostic

* Add test for SymlinkedFileSystemStorage

* Scottx611x/django 1.7 upgrade apache settings fix (#1544)

* Allow for env vars set by Apache to be accessible by Django

* Change "fail-safe" to use our production settings

* Add useful comment

* Switch back to `dev`

* Change Apache conf template to not use `SetEnv` and be able to handle different wsgi configs

* Split into different wsgi config files to move away from SetEnv hack

* Update fabfile accordingly

* Re-add line i removed

* Add new wsgi files and simplify logic to set WSGIScriptAlias

* Update Django debug toolbar to newest version that supports Django 1.7

* Pin sqlparse dependency per: django-commons/django-debug-toolbar#862

* Remove unnecessary fixture

* Remove old south migration that got merged from develop
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