-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
ProgrammingError on postgresql #146
Comments
python version: 3.5.2 |
@rafpaf If it still persists in |
Notes: Sanitized Stacktrace Environment:
Request Method: GET
Request URL: http://test.com/silk/
Django Version: 1.9.8
Python Version: 3.5.2
Installed Applications:
['django_extensions',
'powertrip',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'dbsettings',
'silk']
Installed Middleware:
['silk.middleware.SilkyMiddleware',
'django.middleware.security.SecurityMiddleware',
'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']
Traceback:
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
The above exception (column "silk_request.path" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "silk_request"."id", "silk_request"."path", "silk_req...
^
) was the direct cause of the following exception:
File "/path/to/users/installation/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)
File "/path/to/users/installation/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/path/to/users/installation/lib/python3.5/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "/path/to/users/installation/lib/python3.5/site-packages/django/views/generic/base.py" in dispatch
88. return handler(request, *args, **kwargs)
File "/path/to/users/installation/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapper
67. return bound_func(*args, **kwargs)
File "/path/to/users/installation/lib/python3.5/site-packages/django/utils/decorators.py" in bound_func
63. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/path/to/users/installation/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapper
67. return bound_func(*args, **kwargs)
File "/path/to/users/installation/lib/python3.5/site-packages/django/utils/decorators.py" in bound_func
63. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/path/to/users/installation/lib/python3.5/site-packages/silk/views/summary.py" in get
83. c = self._create_context(request)
File "/path/to/users/installation/lib/python3.5/site-packages/silk/views/summary.py" in _create_context
73. 'most_time_spent_in_db': self._time_spent_in_db_by_view(filters),
File "/path/to/users/installation/lib/python3.5/site-packages/silk/views/summary.py" in _time_spent_in_db_by_view
45. r = models.Request.objects.filter(view_name=view, *filters).annotate(t=Sum('queries__time_taken')).order_by('-t')[0]
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/models/query.py" in __getitem__
297. return list(qs)[0]
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/models/query.py" in __iter__
258. self._fetch_all()
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/models/query.py" in _fetch_all
1074. self._result_cache = list(self.iterator())
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/models/query.py" in __iter__
52. results = compiler.execute_sql()
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
848. cursor.execute(sql, params)
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
79. return super(CursorDebugWrapper, self).execute(sql, params)
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/utils.py" in __exit__
95. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/path/to/users/installation/lib/python3.5/site-packages/django/utils/six.py" in reraise
685. raise value.with_traceback(tb)
File "/path/to/users/installation/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
Exception Type: ProgrammingError at /silk/
Exception Value: column "silk_request.path" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "silk_request"."id", "silk_request"."path", "silk_req...
^ |
Thank you, I'll give that a whirl. |
@rafpaf Should be fixed in release https://github.com/django-silk/silk/releases/tag/0.7.2 If the release does not fix this issue re-open. |
Silk works well in my development sqlite3 environment, but in my production environment, which uses postgresql, I get this error:
ProgrammingError at /silk/
column "silk_request.path" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "silk_request"."id", "silk_request"."path", "silk_req...
Traceback: http://dpaste.com/0WQDKXV
The text was updated successfully, but these errors were encountered: