kolibri: OperationalError: too many SQL variables
Summary
Happens in VM and my local dev repo, where I have imported CK-12 channel from USB drive. Channel isn’t showing as Featured in...
in Recommended
tab with the below errors in the console, but its content can be browsed correctly in Topics
.
System information
- Version: latest develop
- Operating system: Win VM and develop on OSX
- Browser: all
Traceback or relevant snippet from server.log or browser console
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/api/contentnode/all_content/?channel_id=1d8f6d84618153c18c695d85074952a7&1507745570490=1507745570490
Django Version: 1.9.7
Python Version: 2.7.14
Installed Applications:
[u'kolibri.core',
u'django.contrib.admin',
u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.messages',
u'django.contrib.staticfiles',
u'kolibri.auth.apps.KolibriAuthConfig',
u'kolibri.content',
u'kolibri.logger',
u'kolibri.tasks.apps.KolibriTasksConfig',
u'kolibri.core.webpack',
u'kolibri.core.exams',
u'kolibri.core.device',
u'kolibri.core.discovery',
u'rest_framework',
u'django_js_reverse',
u'jsonfield',
u'morango',
u'kolibri.plugins.management',
u'kolibri.plugins.learn',
u'kolibri.plugins.document_pdf_render',
u'kolibri.plugins.html5_app_renderer',
u'kolibri.plugins.media_player',
u'kolibri.plugins.setup_wizard',
u'kolibri.plugins.coach',
u'kolibri.plugins.user',
u'kolibri.plugins.style_guide',
u'kolibri_exercise_perseus_plugin']
Installed Middleware:
(u'django.contrib.sessions.middleware.SessionMiddleware',
u'kolibri.core.device.middleware.KolibriLocaleMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'kolibri.plugins.setup_wizard.middleware.SetupWizardMiddleware',
u'kolibri.auth.middleware.CustomAuthenticationMiddleware',
u'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'django.middleware.clickjacking.XFrameOptionsMiddleware',
u'django.middleware.security.SecurityMiddleware')
Traceback:
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
58. return view_func(*args, **kwargs)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/rest_framework/viewsets.py" in view
87. return self.dispatch(request, *args, **kwargs)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
466. response = self.handle_exception(exc)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
463. response = handler(request, *args, **kwargs)
File "kolibri/content/api.py" in all_content
280. return Response(serializer.data)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/rest_framework/serializers.py" in data
674. ret = super(ListSerializer, self).data
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/rest_framework/serializers.py" in data
239. self._data = self.to_representation(self.instance)
File "kolibri/content/serializers.py" in to_representation
170. if not data:
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in __nonzero__
266. return type(self).__bool__(self)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in __bool__
262. self._fetch_all()
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all
1076. self._prefetch_related_objects()
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in _prefetch_related_objects
656. prefetch_related_objects(self._result_cache, self._prefetch_related_lookups)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in prefetch_related_objects
1457. obj_list, additional_lookups = prefetch_one_level(obj_list, prefetcher, lookup, level)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in prefetch_one_level
1556. prefetcher.get_prefetch_queryset(instances, lookup.get_current_queryset(level)))
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/fields/related_descriptors.py" in get_prefetch_queryset
543. for rel_obj in queryset:
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in __iter__
258. self._fetch_all()
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all
1074. self._result_cache = list(self.iterator())
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/query.py" in __iter__
52. results = compiler.execute_sql()
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
848. cursor.execute(sql, params)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
79. return super(CursorDebugWrapper, self).execute(sql, params)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/utils.py" in __exit__
95. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/Users/mac/.venvs/kolibri-sans2/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py" in execute
323. return Database.Cursor.execute(self, query, params)
Exception Type: OperationalError at /api/contentnode/all_content/
Exception Value: too many SQL variables
How to reproduce
- Download ZIP (beware, 6GB)
- Unzip and do a local import
- Go to
Learn
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (17 by maintainers)
The sign in error is unrelated (and not a bug, just always happens when you log in as a non learner to simplified login).