HTTP 500 on delete user

We are facing an issue on a stadalone installation of KoBo Toolbox. The system was initially installed less than a year ago from kobo-docker repo, and updated 2-3 times since. It is uncertain when the condition set in, but initially it was not present i.e. everything was working fine.

The issue: delete user action in Django admin returns HTTP 500, for any user. Creating users functions, both through /admin/ and /accounts/register.although there is a HTTP 500 on one of AJAX calls in the registration process, a call to path /me/ that returns HTTP 500.

It looks like issue with models in Django app, but we are using docker packaged KoBo. Where to look, what to look for?

Any help is appreciated.

Thanks in advance, Vladimir MS

The debug output of HTTP 500 when attempting to delete an user, as well as delete just related objects:

AttributeError at /admin/auth/user/83/delete/

‘NoneType’ object has no attribute ‘_base_manager’

Request Method: GET

Request URL: https://kobo.my.org/admin/auth/user/83/delete/

Django Version: 1.8.13

Exception Type: AttributeError

Exception Value:

‘NoneType’ object has no attribute ‘_base_manager’

Exception Location: /usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py in get_object_for_this_type, line 196

Python Executable: /usr/local/bin/uwsgi

Python Version: 2.7.12

Python Path:

[’.’,

‘’,

‘/usr/lib/python2.7’,

‘/usr/lib/python2.7/plat-x86_64-linux-gnu’,

‘/usr/lib/python2.7/lib-tk’,

‘/usr/lib/python2.7/lib-old’,

‘/usr/lib/python2.7/lib-dynload’,

‘/usr/local/lib/python2.7/dist-packages’,

‘/srv/pip/src/django-digest’,

‘/srv/pip/src/pyxform’,

‘/srv/pip/src/formpack/src’,

‘/usr/lib/python2.7/dist-packages’,

‘/srv/src/kpi’]

Server time: Fri, 16 Mar 2018 12:20:01 +0000

Traceback Switch to copy-and-paste view

/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py in get_response

response = wrapped_callback(request, *callback_args, **callback_kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py in wrapper

return self.admin_site.admin_view(view)(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapped_view

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py in _wrapped_view_func

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py in inner

return view(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapper

return bound_func(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapped_view

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in bound_func

return func.get(self, type(self))(*args2, **kwargs2) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in inner

return func(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py in delete_view

[obj], opts, request.user, self.admin_site, using) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in get_deleted_objects

to_delete = collector.nested(format_callback) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in nested

roots.extend(self._nested(root, seen, format_callback)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in _nested

children.extend(self._nested(child, seen, format_callback)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in _nested

ret = [format_callback(obj)] …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in format_callback

force_text(obj)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/encoding.py in force_text

s = six.text_type(s) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/guardian/models.py in unicode

unicode(self.content_object), …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/fields.py in get

rel_obj = ct.get_object_for_this_type(pk=getattr(instance, self.fk_field)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py in get_object_for_this_type

return self.model_class()._base_manager.using(self._state.db).get(**kwargs) …

:arrow_forward: Local vars

Request information

GET

No GET data

POST

No POST data

FILES

No FILES data

COOKIES

Variable Value

__troRUID

‘ccbe43fc-1a0d-47de-9325-afa9d111db93’

kobonaut

‘sh1iw7zcwydo8lykq7hpmh7pjtex6gy2’

_ga

‘GA1.2.2062285606.1518630588’

wooTracker

‘VKKNFlwc5lGD’

EMF_VISIT__MD_172

‘16E37C9A-07DD-4BC5-9DDE-B9291506’

_gid

‘GA1.2.566354194.1520851654’

csrftoken

‘eebJ6snHjxGazke3wpXnsnAEUHFnseP5’

__trossion

‘1519644481_1800_2_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1519644481_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1521111810_1521112415_3’

META

Variable Value

wsgi.multiprocess

True

HTTP_COOKIE

‘_ga=GA1.2.2062285606.1518630588; EMF_VISIT__MD_172=16E37C9A-07DD-4BC5-9DDE-B9291506; wooTracker=VKKNFlwc5lGD; _gid=GA1.2.566354194.1520851654; __trossion=1519644481_1800_2_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1519644481_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1521111810_1521112415_3; __troRUID=ccbe43fc-1a0d-47de-9325-afa9d111db93; csrftoken=eebJ6snHjxGazke3wpXnsnAEUHFnseP5; kobonaut=sh1iw7zcwydo8lykq7hpmh7pjtex6gy2’

uwsgi.version

‘2.0.13’

SCRIPT_NAME

u’’

REQUEST_METHOD

‘GET’

PATH_INFO

u’/admin/auth/user/83/delete/’

SERVER_PROTOCOL

‘HTTP/1.1’

QUERY_STRING

‘’

HTTP_X_REAL_IP

‘24.135.98.203’

CONTENT_LENGTH

‘’

HTTP_USER_AGENT

‘Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36’

HTTP_CONNECTION

‘keep-alive’

SERVER_NAME

kobo.my.org

REMOTE_ADDR

‘24.135.98.203’

wsgi.url_scheme

‘https’

SERVER_PORT

‘443’

uwsgi.node

‘kpi’

DOCUMENT_ROOT

‘/usr/share/nginx/html’

HTTP_X_FORWARDED_PROTO

‘https’

wsgi.input

<uwsgi._Input object at 0x7f535bc20c78>

HTTP_HOST

kobo.my.org

HTTPS

‘on’

wsgi.multithread

False

HTTP_UPGRADE_INSECURE_REQUESTS

‘1’

HTTP_CACHE_CONTROL

‘max-age=0’

REQUEST_URI

‘/admin/auth/user/83/delete/’

HTTP_ACCEPT

‘text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8’

wsgi.version

(1, 0)

HTTP_X_FORWARDED_FOR

‘24.135.98.203’

wsgi.errors

<open file ‘wsgi_errors’, mode ‘w’ at 0x7f535caaea50>

REMOTE_PORT

‘53723’

HTTP_ACCEPT_LANGUAGE

‘sr-RS,sr;q=0.9,en-US;q=0.8,en;q=0.7’

wsgi.run_once

False

CONTENT_TYPE

‘’

wsgi.file_wrapper

‘’

CSRF_COOKIE

u’eebJ6snHjxGazke3wpXnsnAEUHFnseP5’

HTTP_ACCEPT_ENCODING

‘gzip, deflate, br’

Settings

Using settings module kobo.settings

Setting Value

MARKITUP_FILTER

(‘markdown.markdown’, {‘safe_mode’: False})

MONTH_DAY_FORMAT

‘F j’

SECURE_BROWSER_XSS_FILTER

False

HAYSTACK_SIGNAL_MODELS

((‘kpi’, ‘Asset’), (‘kpi’, ‘Collection’), (‘taggit’, ‘Tag’))

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

‘en-us’

ROOT_URLCONF

‘kobo.urls’

CELERYD_TASK_TIME_LIMIT

2100

SKIP_HEAVY_MIGRATIONS

False

BROKER_URL

‘amqp://kpi:kpi@rabbit:5672/kpi’

BASE_DIR

‘/srv/src/kpi’

SILENCED_SYSTEM_CHECKS

[]

ACCOUNT_ACTIVATION_DAYS

3

MAXIMUM_EXPORTS_PER_USER_PER_FORM

10

SESSION_SERIALIZER

‘django.contrib.sessions.serializers.JSONSerializer’

STATIC_ROOT

‘/srv/src/kpi/staticfiles’

SYNC_KOBOCAT_XFORMS

True

ALLOWED_HOSTS

[’.my.org’]

MESSAGE_STORAGE

‘django.contrib.messages.storage.fallback.FallbackStorage’

EMAIL_SUBJECT_PREFIX

'[Django] ’

SERVER_EMAIL

‘ko…@kobo.my.org

SECURE_HSTS_SECONDS

0

STATICFILES_FINDERS

(‘django.contrib.staticfiles.finders.FileSystemFinder’,

‘django.contrib.staticfiles.finders.AppDirectoriesFinder’)

SESSION_CACHE_ALIAS

‘default’

SESSION_COOKIE_DOMAIN

‘.my.org’

SESSION_COOKIE_NAME

‘kobonaut’

TIME_INPUT_FORMATS

(’%H:%M:%S’, ‘%H:%M:%S.%f’, ‘%H:%M’)

SECURE_REDIRECT_EXEMPT

[]

DATABASES

{‘default’: {‘ATOMIC_REQUESTS’: False,

‘AUTOCOMMIT’: True,

‘CONN_MAX_AGE’: 0,

‘ENGINE’: ‘django.db.backends.postgresql_psycopg2’,

‘HOST’: ‘postgres’,

‘NAME’: ‘kobotoolbox’,

‘OPTIONS’: {},

‘PASSWORD’: u’********************’,

‘PORT’: 5432,

‘TEST’: {‘CHARSET’: None,

‘COLLATION’: None,

‘MIRROR’: None,

‘NAME’: None},

‘TIME_ZONE’: ‘UTC’,

‘USER’: ‘kobo’}}

EMAIL_SSL_KEYFILE

u’********************’

TEMPLATE_DEBUG

True

FILE_UPLOAD_DIRECTORY_PERMISSIONS

None

FILE_UPLOAD_PERMISSIONS

None

MONGO_DB

Database(MongoClient(host=[‘mongo:27017’], document_class=dict, tz_aware=True, connect=False, j=True), u’formhub’)

FILE_UPLOAD_HANDLERS

(‘django.core.files.uploadhandler.MemoryFileUploadHandler’,

‘django.core.files.uploadhandler.TemporaryFileUploadHandler’)

DEFAULT_CONTENT_TYPE

‘text/html’

GIT_REV

{‘branch’: ‘master’,

‘long’: ‘a3ac18fdf6a4dda41af06dbaee29023b3f015cfa’,

‘short’: ‘a3ac18f’,

‘tag’: ‘2.018.10a’}

APPEND_SLASH

True

FIRST_DAY_OF_WEEK

0

DATABASE_ROUTERS

[]

DEFAULT_TABLESPACE

‘’

YEAR_MONTH_FORMAT

‘F Y’

MONGO_DATABASE

{‘HOST’: ‘mongo’,

‘NAME’: ‘formhub’,

‘PASSWORD’: u’********************’,

‘PORT’: 27017,

‘USER’: ‘’}

CACHES

{‘default’: {‘BACKEND’: ‘django.core.cache.backends.locmem.LocMemCache’}}

SESSION_COOKIE_PATH

‘/’

DEFAULT_DEPLOYMENT_BACKEND

‘kobocat’

SECURE_CONTENT_TYPE_NOSNIFF

False

MIDDLEWARE_CLASSES

(u’debug_toolbar.middleware.DebugToolbarMiddleware’,

‘django.contrib.sessions.middleware.SessionMiddleware’,

‘django.middleware.locale.LocaleMiddleware’,

‘django.middleware.common.CommonMiddleware’,

‘django.middleware.csrf.CsrfViewMiddleware’,

‘django.contrib.auth.middleware.AuthenticationMiddleware’,

‘django.contrib.messages.middleware.MessageMiddleware’,

‘django.middleware.clickjacking.XFrameOptionsMiddleware’,

‘hub.middleware.OtherFormBuilderRedirectMiddleware’)

USE_I18N

True

THOUSAND_SEPARATOR

‘,’

SECRET_KEY

u’********************’

ENKETO_SURVEY_ENDPOINT

‘api/v2/survey/all’

DEFAULT_INDEX_TABLESPACE

‘’

REGISTRATION_EMAIL_HTML

False

LOGGING_CONFIG

‘logging.config.dictConfig’

SIGNING_BACKEND

‘django.core.signing.TimestampSigner’

TEMPLATE_LOADERS

(‘django.template.loaders.filesystem.Loader’,

‘django.template.loaders.app_directories.Loader’)

WSGI_APPLICATION

‘kobo.wsgi.application’

INTERCOM_APP_ID

None

KOBO_SUPPORT_EMAIL

‘mobiled…@my.org

X_FRAME_OPTIONS

‘SAMEORIGIN’

CSRF_COOKIE_NAME

‘csrftoken’

HAYSTACK_CONNECTIONS

{‘default’: {‘ENGINE’: ‘haystack.backends.whoosh_backend.WhooshEngine’,

‘PATH’: ‘/srv/whoosh/whoosh_index’}}

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

EMAIL_TIMEOUT

None

SECURE_SSL_HOST

None

DEFAULT_CHARSET

‘utf-8’

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

‘.my.org’

FILE_CHARSET

‘utf-8’

DEBUG

True

PRIVATE_STORAGE_ROOT

‘/srv/src/kpi/media’

MONGO_CONNECTION

MongoClient(host=[‘mongo:27017’], document_class=dict, tz_aware=True, connect=False, j=True)

LANGUAGE_COOKIE_DOMAIN

None

DEFAULT_FILE_STORAGE

‘django.core.files.storage.FileSystemStorage’

INSTALLED_APPS

(‘django.contrib.auth’,

‘django.contrib.contenttypes’,

‘django.contrib.sessions’,

‘django.contrib.messages’,

‘django.contrib.staticfiles’,

‘reversion’,

‘debug_toolbar’,

‘mptt’,

‘haystack’,

‘private_storage’,

‘kobo.apps.KpiConfig’,

‘hub’,

‘loginas’,

‘webpack_loader’,

‘registration’,

‘django.contrib.admin’,

‘django_extensions’,

‘taggit’,

‘rest_framework’,

‘rest_framework.authtoken’,

‘oauth2_provider’,

‘markitup’,

‘django_digest’,

‘kobo.apps.superuser_stats’,

‘kobo.apps.service_health’,

‘guardian’)

LANGUAGES_BIDI

(‘he’, ‘ar’, ‘fa’, ‘ur’)

USE_L10N

True

ENKETO_SERVER

https://ee.my.org/

STATICFILES_DIRS

(’/srv/src/kpi/jsapp’,

‘/srv/src/kpi/static’,

(‘mocha’, ‘/srv/src/kpi/node_modules/mocha’))

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

(‘HTTP_X_FORWARDED_PROTO’, ‘https’)

LANGUAGE_COOKIE_AGE

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

INTERNAL_IPS

(u’::1’, u’127.0.0.1’)

SYNC_KOBOCAT_PERMISSIONS

True

GOOGLE_ANALYTICS_TOKEN

u’********************’

LOGIN_URL

‘/accounts/login/’

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

CELERYD_TASK_SOFT_TIME_LIMIT

1800

TIME_FORMAT

‘P’

AUTH_USER_MODEL

‘auth.User’

DATE_INPUT_FORMATS

(’%Y-%m-%d’,

‘%m/%d/%Y’,

‘%m/%d/%y’,

‘%b %d %Y’,

‘%b %d, %Y’,

‘%d %b %Y’,

‘%d %b, %Y’,

‘%B %d %Y’,

‘%B %d, %Y’,

‘%d %B %Y’,

‘%d %B, %Y’)

AUTHENTICATION_BACKENDS

(‘django.contrib.auth.backends.ModelBackend’,

‘kpi.backends.ObjectPermissionBackend’)

EMAIL_HOST_PASSWORD

u’********************’

PASSWORD_RESET_TIMEOUT_DAYS

u’********************’

SESSION_FILE_PATH

None

CACHE_MIDDLEWARE_ALIAS

‘default’

SESSION_SAVE_EVERY_REQUEST

False

STATICFILES_STORAGE

‘django.contrib.staticfiles.storage.StaticFilesStorage’

NUMBER_GROUPING

0

SESSION_ENGINE

‘django.contrib.sessions.backends.db’

CSRF_FAILURE_VIEW

‘django.views.csrf.csrf_failure’

CSRF_COOKIE_PATH

‘/’

LOGIN_REDIRECT_URL

‘/’

DECIMAL_SEPARATOR

‘.’

IGNORABLE_404_URLS

()

LOCALE_PATHS

(’/srv/src/kpi/locale’,)

KOBOCAT_INTERNAL_URL

https://kc.my.org

TEMPLATE_STRING_IF_INVALID

‘’

ENKETO_VERSION

‘express’

RAVEN_JS_DSN

None

LOGOUT_URL

‘/accounts/logout/’

EMAIL_USE_TLS

‘False’

FIXTURE_DIRS

()

EMAIL_HOST

kobo.my.org

DATE_FORMAT

‘N j, Y’

DKOBO_PREFIX

False

CAN_LOGIN_AS

<function at 0x7f53677720c8>

MEDIA_ROOT

‘/srv/src/kpi/media’

LANGUAGE_COOKIE_PATH

‘/’

DEFAULT_EXCEPTION_REPORTER_FILTER

‘django.views.debug.SafeExceptionReporterFilter’

ADMINS

()

SYNC_KOBOCAT_XFORMS_PERIOD_MINUTES

30

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

‘ko…@kobo.my.org

SECURE_HSTS_INCLUDE_SUBDOMAINS

False

REST_FRAMEWORK

{‘DEFAULT_AUTHENTICATION_CLASSES’: [‘rest_framework.authentication.SessionAuthentication’,

‘rest_framework.authentication.BasicAuthentication’,

‘rest_framework.authentication.TokenAuthentication’],

‘DEFAULT_PAGINATION_CLASS’: ‘kpi.serializers.Paginated’,

‘PAGE_SIZE’: 100,

‘URL_FIELD_NAME’: ‘url’}

KOBO_SUPPORT_URL

mailto:mobileda...@my.org

MEDIA_URL

‘/media/’

DATETIME_FORMAT

‘N j, Y, P’

TEMPLATE_DIRS

()

NATIVE_LANGUAGE_NAMES

{u’ku’: u’\u0643\u0648\u0631\u062f\u06cc’}

KOBOCAT_URL

https://kc.my.org

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

ENKETO_PREVIEW_URI

‘preview’

WHOOSH_PATH

‘/srv/whoosh/whoosh_index’

LOGGING

{}

SHORT_DATE_FORMAT

‘m/d/Y’

TEMPLATES

[]

EXPOSE_GIT_REV

False

TEST_RUNNER

‘kobo.settings.DoNotUseRunner’

CELERYD_MAX_TASKS_PER_CHILD

7

CACHE_MIDDLEWARE_KEY_PREFIX

u’********************’

SECURE_SSL_REDIRECT

False

TIME_ZONE

‘UTC’

REGISTRATION_AUTO_LOGIN

True

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

MANAGERS

()

EMAIL_BACKEND

‘django.core.mail.backends.smtp.EmailBackend’

ANONYMOUS_USER_ID

-1

CELERYD_MAX_CONCURRENCY

6

LANGUAGE_COOKIE_NAME

‘django_language’

EMAIL_USE_SSL

False

TEMPLATE_CONTEXT_PROCESSORS

(‘django.contrib.auth.context_processors.auth’,

‘django.template.context_processors.debug’,

‘django.template.context_processors.i18n’,

‘django.template.context_processors.media’,

‘django.template.context_processors.static’,

‘django.template.context_processors.tz’,

‘django.contrib.messages.context_processors.messages’,

‘kpi.context_processors.external_service_tokens’,

‘kpi.context_processors.email’,

‘kpi.context_processors.sitewide_messages’)

KPI_PREFIX

‘/’

MIGRATION_MODULES

{}

MONGO_CONNECTION_URL

‘mongodb://mongo:27017’

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

‘kobo.settings’

USE_ETAGS

False

LANGUAGES

[(‘en’, u’English’), (‘fr’, u’fran\xe7ais’)]

HAYSTACK_SIGNAL_PROCESSOR

‘kpi.haystack_utils.SignalProcessor’

FILE_UPLOAD_TEMP_DIR

None

CSRF_COOKIE_AGE

31449600

STATIC_URL

‘/static/’

WEBPACK_LOADER

{‘DEFAULT’: {‘BUNDLE_DIR_NAME’: ‘jsapp/compiled/’,

‘POLL_INTERVAL’: 0.5,

‘TIMEOUT’: 5}}

EMAIL_PORT

‘587’

PRIVATE_STORAGE_AUTH_FUNCTION

‘kpi.utils.private_storage.superuser_or_username_matches_prefix’

USE_TZ

True

SHORT_DATETIME_FORMAT

‘m/d/Y P’

TEST_NON_SERIALIZED_APPS

[]

ENKETO_API_TOKEN

u’********************’

PASSWORD_HASHERS

u’********************’

ABSOLUTE_URL_OVERRIDES

{}

KOBOCAT_DEFAULT_PERMISSION_CONTENT_TYPES

[(‘main’, ‘userprofile’),

(‘logger’, ‘xform’),

(‘api’, ‘project’),

(‘api’, ‘team’),

(‘api’, ‘organizationprofile’),

(‘logger’, ‘note’)]

CELERYBEAT_SCHEDULE

{‘sync-kobocat-xforms’: {‘options’: {‘expires’: 900.0,

‘queue’: ‘sync_kobocat_xforms_queue’},

‘schedule’: datetime.timedelta(0, 1800),

‘task’: ‘kpi.tasks.sync_kobocat_xforms’}}

UPCOMING_DOWNTIME

False

CACHE_MIDDLEWARE_SECONDS

600

EMAIL_SSL_CERTFILE

None

ALLOWED_ANONYMOUS_PERMISSIONS

(‘kpi.view_collection’, ‘kpi.view_asset’, ‘kpi.view_submissions’)

CSRF_COOKIE_HTTPONLY

False

DATETIME_INPUT_FORMATS

(’%Y-%m-%d %H:%M:%S’,

‘%Y-%m-%d %H:%M:%S.%f’,

‘%Y-%m-%d %H:%M’,

‘%Y-%m-%d’,

‘%m/%d/%Y %H:%M:%S’,

‘%m/%d/%Y %H:%M:%S.%f’,

‘%m/%d/%Y %H:%M’,

‘%m/%d/%Y’,

‘%m/%d/%y %H:%M:%S’,

‘%m/%d/%y %H:%M:%S.%f’,

‘%m/%d/%y %H:%M’,

‘%m/%d/%y’)

KOBO_SURVEY_PREVIEW_EXPIRATION

24

EMAIL_HOST_USER

‘ko…@kobo.my.org

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

Hey Vladimir,

I don’t remember the specifics, but I remember having problems with that as well. One issue is, that the kpi and kobocat subsystems share a common database. So when you delete an object from either subsystem, there still might be relations that the current subsystem doesn’t know about, because they are set up in the models of the other subsystem. That might be part of the issue that leads to the 500.

I don’t have a solution for the problem, but I have one word of advice: Be careful with using the admin with KoBo (and probably in general). The problem is that some views are “fat”, which means they do more than just the same action that you trigger through the admin interface. So if you e.g. create a user with the admin, it might not get all the necessary permissions, related objects created etc. This is only an example, I don’t know if it’s indeed the case with user creation. But in general it’s better to not use the admin when you can achieve the same by using the normal user interface, unless you know that the views don’t do more than what happens when you use the admin or interactive shell.

Best,

Jesaja

···

On Fri, Mar 16, 2018 at 1:37 PM, Vladimir Marić vladimi...@mreznisistemi.rs wrote:

The debug output of HTTP 500 when attempting to delete an user, as well as delete just related objects:

AttributeError at /admin/auth/user/83/delete/

‘NoneType’ object has no attribute ‘_base_manager’

Request Method: GET

Request URL: https://kobo.my.org/admin/auth/user/83/delete/

Django Version: 1.8.13

Exception Type: AttributeError

Exception Value:

‘NoneType’ object has no attribute ‘_base_manager’

Exception Location: /usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py in get_object_for_this_type, line 196

Python Executable: /usr/local/bin/uwsgi

Python Version: 2.7.12

Python Path:

[’.’,

‘’,

‘/usr/lib/python2.7’,

‘/usr/lib/python2.7/plat-x86_64-linux-gnu’,

‘/usr/lib/python2.7/lib-tk’,

‘/usr/lib/python2.7/lib-old’,

‘/usr/lib/python2.7/lib-dynload’,

‘/usr/local/lib/python2.7/dist-packages’,

‘/srv/pip/src/django-digest’,

‘/srv/pip/src/pyxform’,

‘/srv/pip/src/formpack/src’,

‘/usr/lib/python2.7/dist-packages’,

‘/srv/src/kpi’]

Server time: Fri, 16 Mar 2018 12:20:01 +0000

Traceback Switch to copy-and-paste view

/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py in get_response

response = wrapped_callback(request, *callback_args, **callback_kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py in wrapper

return self.admin_site.admin_view(view)(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapped_view

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py in _wrapped_view_func

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py in inner

return view(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapper

return bound_func(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapped_view

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in bound_func

return func.get(self, type(self))(*args2, **kwargs2) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in inner

return func(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py in delete_view

[obj], opts, request.user, self.admin_site, using) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in get_deleted_objects

to_delete = collector.nested(format_callback) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in nested

roots.extend(self._nested(root, seen, format_callback)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in _nested

children.extend(self._nested(child, seen, format_callback)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in _nested

ret = [format_callback(obj)] …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in format_callback

force_text(obj)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/encoding.py in force_text

s = six.text_type(s) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/guardian/models.py in unicode

unicode(self.content_object), …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/fields.py in get

rel_obj = ct.get_object_for_this_type(pk=getattr(instance, self.fk_field)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py in get_object_for_this_type

return self.model_class()._base_manager.using(self._state.db).get(**kwargs) …

:arrow_forward: Local vars

Request information

GET

No GET data

POST

No POST data

FILES

No FILES data

COOKIES

Variable Value

__troRUID

‘ccbe43fc-1a0d-47de-9325-afa9d111db93’

kobonaut

‘sh1iw7zcwydo8lykq7hpmh7pjtex6gy2’

_ga

‘GA1.2.2062285606.1518630588’

wooTracker

‘VKKNFlwc5lGD’

EMF_VISIT__MD_172

‘16E37C9A-07DD-4BC5-9DDE-B9291506’

_gid

‘GA1.2.566354194.1520851654’

csrftoken

‘eebJ6snHjxGazke3wpXnsnAEUHFnseP5’

__trossion

‘1519644481_1800_2_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1519644481_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1521111810_1521112415_3’

META

Variable Value

wsgi.multiprocess

True

HTTP_COOKIE

‘_ga=GA1.2.2062285606.1518630588; EMF_VISIT__MD_172=16E37C9A-07DD-4BC5-9DDE-B9291506; wooTracker=VKKNFlwc5lGD; _gid=GA1.2.566354194.1520851654; __trossion=1519644481_1800_2_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1519644481_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1521111810_1521112415_3; __troRUID=ccbe43fc-1a0d-47de-9325-afa9d111db93; csrftoken=eebJ6snHjxGazke3wpXnsnAEUHFnseP5; kobonaut=sh1iw7zcwydo8lykq7hpmh7pjtex6gy2’

uwsgi.version

‘2.0.13’

SCRIPT_NAME

u’’

REQUEST_METHOD

‘GET’

PATH_INFO

u’/admin/auth/user/83/delete/’

SERVER_PROTOCOL

‘HTTP/1.1’

QUERY_STRING

‘’

HTTP_X_REAL_IP

‘24.135.98.203’

CONTENT_LENGTH

‘’

HTTP_USER_AGENT

‘Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36’

HTTP_CONNECTION

‘keep-alive’

SERVER_NAME

kobo.my.org

REMOTE_ADDR

‘24.135.98.203’

wsgi.url_scheme

‘https’

SERVER_PORT

‘443’

uwsgi.node

‘kpi’

DOCUMENT_ROOT

‘/usr/share/nginx/html’

HTTP_X_FORWARDED_PROTO

‘https’

wsgi.input

<uwsgi._Input object at 0x7f535bc20c78>

HTTP_HOST

kobo.my.org

HTTPS

‘on’

wsgi.multithread

False

HTTP_UPGRADE_INSECURE_REQUESTS

‘1’

HTTP_CACHE_CONTROL

‘max-age=0’

REQUEST_URI

‘/admin/auth/user/83/delete/’

HTTP_ACCEPT

‘text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8’

wsgi.version

(1, 0)

HTTP_X_FORWARDED_FOR

‘24.135.98.203’

wsgi.errors

<open file ‘wsgi_errors’, mode ‘w’ at 0x7f535caaea50>

REMOTE_PORT

‘53723’

HTTP_ACCEPT_LANGUAGE

‘sr-RS,sr;q=0.9,en-US;q=0.8,en;q=0.7’

wsgi.run_once

False

CONTENT_TYPE

‘’

wsgi.file_wrapper

‘’

CSRF_COOKIE

u’eebJ6snHjxGazke3wpXnsnAEUHFnseP5’

HTTP_ACCEPT_ENCODING

‘gzip, deflate, br’

Settings

Using settings module kobo.settings

Setting Value

MARKITUP_FILTER

(‘markdown.markdown’, {‘safe_mode’: False})

MONTH_DAY_FORMAT

‘F j’

SECURE_BROWSER_XSS_FILTER

False

HAYSTACK_SIGNAL_MODELS

((‘kpi’, ‘Asset’), (‘kpi’, ‘Collection’), (‘taggit’, ‘Tag’))

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

‘en-us’

ROOT_URLCONF

‘kobo.urls’

CELERYD_TASK_TIME_LIMIT

2100

SKIP_HEAVY_MIGRATIONS

False

BROKER_URL

‘amqp://kpi:kpi@rabbit:5672/kpi’

BASE_DIR

‘/srv/src/kpi’

SILENCED_SYSTEM_CHECKS

[]

ACCOUNT_ACTIVATION_DAYS

3

MAXIMUM_EXPORTS_PER_USER_PER_FORM

10

SESSION_SERIALIZER

‘django.contrib.sessions.serializers.JSONSerializer’

STATIC_ROOT

‘/srv/src/kpi/staticfiles’

SYNC_KOBOCAT_XFORMS

True

ALLOWED_HOSTS

[’.my.org’]

MESSAGE_STORAGE

‘django.contrib.messages.storage.fallback.FallbackStorage’

EMAIL_SUBJECT_PREFIX

'[Django] ’

SERVER_EMAIL

‘kobo…@kobo.my.org

SECURE_HSTS_SECONDS

0

STATICFILES_FINDERS

(‘django.contrib.staticfiles.finders.FileSystemFinder’,

‘django.contrib.staticfiles.finders.AppDirectoriesFinder’)

SESSION_CACHE_ALIAS

‘default’

SESSION_COOKIE_DOMAIN

‘.my.org

SESSION_COOKIE_NAME

‘kobonaut’

TIME_INPUT_FORMATS

(’%H:%M:%S’, ‘%H:%M:%S.%f’, ‘%H:%M’)

SECURE_REDIRECT_EXEMPT

[]

DATABASES

{‘default’: {‘ATOMIC_REQUESTS’: False,

‘AUTOCOMMIT’: True,

‘CONN_MAX_AGE’: 0,

‘ENGINE’: ‘django.db.backends.postgresql_psycopg2’,

‘HOST’: ‘postgres’,

‘NAME’: ‘kobotoolbox’,

‘OPTIONS’: {},

‘PASSWORD’: u’********************’,

‘PORT’: 5432,

‘TEST’: {‘CHARSET’: None,

‘COLLATION’: None,

‘MIRROR’: None,

‘NAME’: None},

‘TIME_ZONE’: ‘UTC’,

‘USER’: ‘kobo’}}

EMAIL_SSL_KEYFILE

u’********************’

TEMPLATE_DEBUG

True

FILE_UPLOAD_DIRECTORY_PERMISSIONS

None

FILE_UPLOAD_PERMISSIONS

None

MONGO_DB

Database(MongoClient(host=[‘mongo:27017’], document_class=dict, tz_aware=True, connect=False, j=True), u’formhub’)

FILE_UPLOAD_HANDLERS

(‘django.core.files.uploadhandler.MemoryFileUploadHandler’,

‘django.core.files.uploadhandler.TemporaryFileUploadHandler’)

DEFAULT_CONTENT_TYPE

‘text/html’

GIT_REV

{‘branch’: ‘master’,

‘long’: ‘a3ac18fdf6a4dda41af06dbaee29023b3f015cfa’,

‘short’: ‘a3ac18f’,

‘tag’: ‘2.018.10a’}

APPEND_SLASH

True

FIRST_DAY_OF_WEEK

0

DATABASE_ROUTERS

[]

DEFAULT_TABLESPACE

‘’

YEAR_MONTH_FORMAT

‘F Y’

MONGO_DATABASE

{‘HOST’: ‘mongo’,

‘NAME’: ‘formhub’,

‘PASSWORD’: u’********************’,

‘PORT’: 27017,

‘USER’: ‘’}

CACHES

{‘default’: {‘BACKEND’: ‘django.core.cache.backends.locmem.LocMemCache’}}

SESSION_COOKIE_PATH

‘/’

DEFAULT_DEPLOYMENT_BACKEND

‘kobocat’

SECURE_CONTENT_TYPE_NOSNIFF

False

MIDDLEWARE_CLASSES

(u’debug_toolbar.middleware.DebugToolbarMiddleware’,

‘django.contrib.sessions.middleware.SessionMiddleware’,

‘django.middleware.locale.LocaleMiddleware’,

‘django.middleware.common.CommonMiddleware’,

‘django.middleware.csrf.CsrfViewMiddleware’,

‘django.contrib.auth.middleware.AuthenticationMiddleware’,

‘django.contrib.messages.middleware.MessageMiddleware’,

‘django.middleware.clickjacking.XFrameOptionsMiddleware’,

‘hub.middleware.OtherFormBuilderRedirectMiddleware’)

USE_I18N

True

THOUSAND_SEPARATOR

‘,’

SECRET_KEY

u’********************’

ENKETO_SURVEY_ENDPOINT

‘api/v2/survey/all’

DEFAULT_INDEX_TABLESPACE

‘’

REGISTRATION_EMAIL_HTML

False

LOGGING_CONFIG

‘logging.config.dictConfig’

SIGNING_BACKEND

‘django.core.signing.TimestampSigner’

TEMPLATE_LOADERS

(‘django.template.loaders.filesystem.Loader’,

‘django.template.loaders.app_directories.Loader’)

WSGI_APPLICATION

‘kobo.wsgi.application’

INTERCOM_APP_ID

None

KOBO_SUPPORT_EMAIL

‘mobileda…@my.org

X_FRAME_OPTIONS

‘SAMEORIGIN’

CSRF_COOKIE_NAME

‘csrftoken’

HAYSTACK_CONNECTIONS

{‘default’: {‘ENGINE’: ‘haystack.backends.whoosh_backend.WhooshEngine’,

‘PATH’: ‘/srv/whoosh/whoosh_index’}}

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

EMAIL_TIMEOUT

None

SECURE_SSL_HOST

None

DEFAULT_CHARSET

‘utf-8’

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

‘.my.org

FILE_CHARSET

‘utf-8’

DEBUG

True

PRIVATE_STORAGE_ROOT

‘/srv/src/kpi/media’

MONGO_CONNECTION

MongoClient(host=[‘mongo:27017’], document_class=dict, tz_aware=True, connect=False, j=True)

LANGUAGE_COOKIE_DOMAIN

None

DEFAULT_FILE_STORAGE

‘django.core.files.storage.FileSystemStorage’

INSTALLED_APPS

(‘django.contrib.auth’,

‘django.contrib.contenttypes’,

‘django.contrib.sessions’,

‘django.contrib.messages’,

‘django.contrib.staticfiles’,

‘reversion’,

‘debug_toolbar’,

‘mptt’,

‘haystack’,

‘private_storage’,

‘kobo.apps.KpiConfig’,

‘hub’,

‘loginas’,

‘webpack_loader’,

‘registration’,

‘django.contrib.admin’,

‘django_extensions’,

‘taggit’,

‘rest_framework’,

‘rest_framework.authtoken’,

‘oauth2_provider’,

‘markitup’,

‘django_digest’,

‘kobo.apps.superuser_stats’,

‘kobo.apps.service_health’,

‘guardian’)

LANGUAGES_BIDI

(‘he’, ‘ar’, ‘fa’, ‘ur’)

USE_L10N

True

ENKETO_SERVER

https://ee.my.org/

STATICFILES_DIRS

(’/srv/src/kpi/jsapp’,

‘/srv/src/kpi/static’,

(‘mocha’, ‘/srv/src/kpi/node_modules/mocha’))

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

(‘HTTP_X_FORWARDED_PROTO’, ‘https’)

LANGUAGE_COOKIE_AGE

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

INTERNAL_IPS

(u’::1’, u’127.0.0.1’)

SYNC_KOBOCAT_PERMISSIONS

True

GOOGLE_ANALYTICS_TOKEN

u’********************’

LOGIN_URL

‘/accounts/login/’

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

CELERYD_TASK_SOFT_TIME_LIMIT

1800

TIME_FORMAT

‘P’

AUTH_USER_MODEL

‘auth.User’

DATE_INPUT_FORMATS

(’%Y-%m-%d’,

‘%m/%d/%Y’,

‘%m/%d/%y’,

‘%b %d %Y’,

‘%b %d, %Y’,

‘%d %b %Y’,

‘%d %b, %Y’,

‘%B %d %Y’,

‘%B %d, %Y’,

‘%d %B %Y’,

‘%d %B, %Y’)

AUTHENTICATION_BACKENDS

(‘django.contrib.auth.backends.ModelBackend’,

‘kpi.backends.ObjectPermissionBackend’)

EMAIL_HOST_PASSWORD

u’********************’

PASSWORD_RESET_TIMEOUT_DAYS

u’********************’

SESSION_FILE_PATH

None

CACHE_MIDDLEWARE_ALIAS

‘default’

SESSION_SAVE_EVERY_REQUEST

False

STATICFILES_STORAGE

‘django.contrib.staticfiles.storage.StaticFilesStorage’

NUMBER_GROUPING

0

SESSION_ENGINE

‘django.contrib.sessions.backends.db’

CSRF_FAILURE_VIEW

‘django.views.csrf.csrf_failure’

CSRF_COOKIE_PATH

‘/’

LOGIN_REDIRECT_URL

‘/’

DECIMAL_SEPARATOR

‘.’

IGNORABLE_404_URLS

()

LOCALE_PATHS

(’/srv/src/kpi/locale’,)

KOBOCAT_INTERNAL_URL

https://kc.my.org

TEMPLATE_STRING_IF_INVALID

‘’

ENKETO_VERSION

‘express’

RAVEN_JS_DSN

None

LOGOUT_URL

‘/accounts/logout/’

EMAIL_USE_TLS

‘False’

FIXTURE_DIRS

()

EMAIL_HOST

kobo.my.org

DATE_FORMAT

‘N j, Y’

DKOBO_PREFIX

False

CAN_LOGIN_AS

<function at 0x7f53677720c8>

MEDIA_ROOT

‘/srv/src/kpi/media’

LANGUAGE_COOKIE_PATH

‘/’

DEFAULT_EXCEPTION_REPORTER_FILTER

‘django.views.debug.SafeExceptionReporterFilter’

ADMINS

()

SYNC_KOBOCAT_XFORMS_PERIOD_MINUTES

30

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

‘kobo…@kobo.my.org

SECURE_HSTS_INCLUDE_SUBDOMAINS

False

REST_FRAMEWORK

{‘DEFAULT_AUTHENTICATION_CLASSES’: [‘rest_framework.authentication.SessionAuthentication’,

‘rest_framework.authentication.BasicAuthentication’,

‘rest_framework.authentication.TokenAuthentication’],

‘DEFAULT_PAGINATION_CLASS’: ‘kpi.serializers.Paginated’,

‘PAGE_SIZE’: 100,

‘URL_FIELD_NAME’: ‘url’}

KOBO_SUPPORT_URL

mailto:mobiledatasupport@my.org

MEDIA_URL

‘/media/’

DATETIME_FORMAT

‘N j, Y, P’

TEMPLATE_DIRS

()

NATIVE_LANGUAGE_NAMES

{u’ku’: u’\u0643\u0648\u0631\u062f\u06cc’}

KOBOCAT_URL

https://kc.my.org

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

ENKETO_PREVIEW_URI

‘preview’

WHOOSH_PATH

‘/srv/whoosh/whoosh_index’

LOGGING

{}

SHORT_DATE_FORMAT

‘m/d/Y’

TEMPLATES

[]

EXPOSE_GIT_REV

False

TEST_RUNNER

‘kobo.settings.DoNotUseRunner’

CELERYD_MAX_TASKS_PER_CHILD

7

CACHE_MIDDLEWARE_KEY_PREFIX

u’********************’

SECURE_SSL_REDIRECT

False

TIME_ZONE

‘UTC’

REGISTRATION_AUTO_LOGIN

True

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

MANAGERS

()

EMAIL_BACKEND

‘django.core.mail.backends.smtp.EmailBackend’

ANONYMOUS_USER_ID

-1

CELERYD_MAX_CONCURRENCY

6

LANGUAGE_COOKIE_NAME

‘django_language’

EMAIL_USE_SSL

False

TEMPLATE_CONTEXT_PROCESSORS

(‘django.contrib.auth.context_processors.auth’,

‘django.template.context_processors.debug’,

‘django.template.context_processors.i18n’,

‘django.template.context_processors.media’,

‘django.template.context_processors.static’,

django.template.context_processors.tz’,

‘django.contrib.messages.context_processors.messages’,

‘kpi.context_processors.external_service_tokens’,

‘kpi.context_processors.email’,

‘kpi.context_processors.sitewide_messages’)

KPI_PREFIX

‘/’

MIGRATION_MODULES

{}

MONGO_CONNECTION_URL

‘mongodb://mongo:27017’

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

‘kobo.settings’

USE_ETAGS

False

LANGUAGES

[(‘en’, u’English’), (‘fr’, u’fran\xe7ais’)]

HAYSTACK_SIGNAL_PROCESSOR

‘kpi.haystack_utils.SignalProcessor’

FILE_UPLOAD_TEMP_DIR

None

CSRF_COOKIE_AGE

31449600

STATIC_URL

‘/static/’

WEBPACK_LOADER

{‘DEFAULT’: {‘BUNDLE_DIR_NAME’: ‘jsapp/compiled/’,

‘POLL_INTERVAL’: 0.5,

‘TIMEOUT’: 5}}

EMAIL_PORT

‘587’

PRIVATE_STORAGE_AUTH_FUNCTION

‘kpi.utils.private_storage.superuser_or_username_matches_prefix’

USE_TZ

True

SHORT_DATETIME_FORMAT

‘m/d/Y P’

TEST_NON_SERIALIZED_APPS

[]

ENKETO_API_TOKEN

u’********************’

PASSWORD_HASHERS

u’********************’

ABSOLUTE_URL_OVERRIDES

{}

KOBOCAT_DEFAULT_PERMISSION_CONTENT_TYPES

[(‘main’, ‘userprofile’),

(‘logger’, ‘xform’),

(‘api’, ‘project’),

(‘api’, ‘team’),

(‘api’, ‘organizationprofile’),

(‘logger’, ‘note’)]

CELERYBEAT_SCHEDULE

{‘sync-kobocat-xforms’: {‘options’: {‘expires’: 900.0,

‘queue’: ‘sync_kobocat_xforms_queue’},

‘schedule’: datetime.timedelta(0, 1800),

‘task’: ‘kpi.tasks.sync_kobocat_xforms’}}

UPCOMING_DOWNTIME

False

CACHE_MIDDLEWARE_SECONDS

600

EMAIL_SSL_CERTFILE

None

ALLOWED_ANONYMOUS_PERMISSIONS

(‘kpi.view_collection’, ‘kpi.view_asset’, ‘kpi.view_submissions’)

CSRF_COOKIE_HTTPONLY

False

DATETIME_INPUT_FORMATS

(’%Y-%m-%d %H:%M:%S’,

‘%Y-%m-%d %H:%M:%S.%f’,

‘%Y-%m-%d %H:%M’,

‘%Y-%m-%d’,

‘%m/%d/%Y %H:%M:%S’,

‘%m/%d/%Y %H:%M:%S.%f’,

‘%m/%d/%Y %H:%M’,

‘%m/%d/%Y’,

‘%m/%d/%y %H:%M:%S’,

‘%m/%d/%y %H:%M:%S.%f’,

‘%m/%d/%y %H:%M’,

‘%m/%d/%y’)

KOBO_SURVEY_PREVIEW_EXPIRATION

24

EMAIL_HOST_USER

‘kobo…@kobo.my.org

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

You received this message because you are subscribed to the Google Groups “KoBoToolbox Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+unsubscribe@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Hi Jesaja, thanks for the insight.

I approached the problem along the similar lines; but in this case, all users were created through accounts/register and all deletions were attempted through /admin/auth/user/USERID/delete, i.e. Delete button in Change user.

We investigated further and established that related objects are in fact the issue. User that has registered but has not activated can be deleted. Once he or she confirms his email (or admin saves Change user page), the attempt to delete fails. The workaround is deleting the user from postgres database, cascading manually. Tested in different scenarios, all OK. But it is hacking, let’s be honest.

KoBo is freshly updated, all the images are latest except EE-widgets which is 1.57.0 and Reddis which is 2.6 (per distibution settings).

I would expect that an issue like this would be resolved by upgrading to the latest versions and allowing them to run their migrations, however we are already at the latest ver.

Thanks again. Any further input is welcome, a solution more so :-))

Cheers, Vladimir

···

On Friday, March 16, 2018 at 3:26:28 PM UTC+1, Jesaja Everling wrote:

Hey Vladimir,

I don’t remember the specifics, but I remember having problems with that as well. One issue is, that the kpi and kobocat subsystems share a common database. So when you delete an object from either subsystem, there still might be relations that the current subsystem doesn’t know about, because they are set up in the models of the other subsystem. That might be part of the issue that leads to the 500.

I don’t have a solution for the problem, but I have one word of advice: Be careful with using the admin with KoBo (and probably in general). The problem is that some views are “fat”, which means they do more than just the same action that you trigger through the admin interface. So if you e.g. create a user with the admin, it might not get all the necessary permissions, related objects created etc. This is only an example, I don’t know if it’s indeed the case with user creation. But in general it’s better to not use the admin when you can achieve the same by using the normal user interface, unless you know that the views don’t do more than what happens when you use the admin or interactive shell.

Best,

Jesaja

On Fri, Mar 16, 2018 at 1:37 PM, Vladimir Marić vladimi...@mreznisistemi.rs wrote:

The debug output of HTTP 500 when attempting to delete an user, as well as delete just related objects:

AttributeError at /admin/auth/user/83/delete/

‘NoneType’ object has no attribute ‘_base_manager’

Request Method: GET

Request URL: https://kobo.my.org/admin/auth/user/83/delete/

Django Version: 1.8.13

Exception Type: AttributeError

Exception Value:

‘NoneType’ object has no attribute ‘_base_manager’

Exception Location: /usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py in get_object_for_this_type, line 196

Python Executable: /usr/local/bin/uwsgi

Python Version: 2.7.12

Python Path:

[’.’,

‘’,

‘/usr/lib/python2.7’,

‘/usr/lib/python2.7/plat-x86_64-linux-gnu’,

‘/usr/lib/python2.7/lib-tk’,

‘/usr/lib/python2.7/lib-old’,

‘/usr/lib/python2.7/lib-dynload’,

‘/usr/local/lib/python2.7/dist-packages’,

‘/srv/pip/src/django-digest’,

‘/srv/pip/src/pyxform’,

‘/srv/pip/src/formpack/src’,

‘/usr/lib/python2.7/dist-packages’,

‘/srv/src/kpi’]

Server time: Fri, 16 Mar 2018 12:20:01 +0000

Traceback Switch to copy-and-paste view

/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py in get_response

response = wrapped_callback(request, *callback_args, **callback_kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py in wrapper

return self.admin_site.admin_view(view)(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapped_view

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py in _wrapped_view_func

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py in inner

return view(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapper

return bound_func(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in _wrapped_view

response = view_func(request, *args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in bound_func

return func.get(self, type(self))(*args2, **kwargs2) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in inner

return func(*args, **kwargs) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py in delete_view

[obj], opts, request.user, self.admin_site, using) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in get_deleted_objects

to_delete = collector.nested(format_callback) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in nested

roots.extend(self._nested(root, seen, format_callback)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in _nested

children.extend(self._nested(child, seen, format_callback)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in _nested

ret = [format_callback(obj)] …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/admin/utils.py in format_callback

force_text(obj)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/utils/encoding.py in force_text

s = six.text_type(s) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/guardian/models.py in unicode

unicode(self.content_object), …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/fields.py in get

rel_obj = ct.get_object_for_this_type(pk=getattr(instance, self.fk_field)) …

:arrow_forward: Local vars

/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py in get_object_for_this_type

return self.model_class()._base_manager.using(self._state.db).get(**kwargs) …

:arrow_forward: Local vars

Request information

GET

No GET data

POST

No POST data

FILES

No FILES data

COOKIES

Variable Value

__troRUID

‘ccbe43fc-1a0d-47de-9325-afa9d111db93’

kobonaut

‘sh1iw7zcwydo8lykq7hpmh7pjtex6gy2’

_ga

‘GA1.2.2062285606.1518630588’

wooTracker

‘VKKNFlwc5lGD’

EMF_VISIT__MD_172

‘16E37C9A-07DD-4BC5-9DDE-B9291506’

_gid

‘GA1.2.566354194.1520851654’

csrftoken

‘eebJ6snHjxGazke3wpXnsnAEUHFnseP5’

__trossion

‘1519644481_1800_2_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1519644481_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1521111810_1521112415_3’

META

Variable Value

wsgi.multiprocess

True

HTTP_COOKIE

‘_ga=GA1.2.2062285606.1518630588; EMF_VISIT__MD_172=16E37C9A-07DD-4BC5-9DDE-B9291506; wooTracker=VKKNFlwc5lGD; _gid=GA1.2.566354194.1520851654; __trossion=1519644481_1800_2_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1519644481_ccbe43fc-1a0d-47de-9325-afa9d111db93%3A1521111810_1521112415_3; __troRUID=ccbe43fc-1a0d-47de-9325-afa9d111db93; csrftoken=eebJ6snHjxGazke3wpXnsnAEUHFnseP5; kobonaut=sh1iw7zcwydo8lykq7hpmh7pjtex6gy2’

uwsgi.version

‘2.0.13’

SCRIPT_NAME

u’’

REQUEST_METHOD

‘GET’

PATH_INFO

u’/admin/auth/user/83/delete/’

SERVER_PROTOCOL

‘HTTP/1.1’

QUERY_STRING

‘’

HTTP_X_REAL_IP

‘24.135.98.203’

CONTENT_LENGTH

‘’

HTTP_USER_AGENT

‘Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36’

HTTP_CONNECTION

‘keep-alive’

SERVER_NAME

kobo.my.org

REMOTE_ADDR

‘24.135.98.203’

wsgi.url_scheme

‘https’

SERVER_PORT

‘443’

uwsgi.node

‘kpi’

DOCUMENT_ROOT

‘/usr/share/nginx/html’

HTTP_X_FORWARDED_PROTO

‘https’

wsgi.input

<uwsgi._Input object at 0x7f535bc20c78>

HTTP_HOST

kobo.my.org

HTTPS

‘on’

wsgi.multithread

False

HTTP_UPGRADE_INSECURE_REQUESTS

‘1’

HTTP_CACHE_CONTROL

‘max-age=0’

REQUEST_URI

‘/admin/auth/user/83/delete/’

HTTP_ACCEPT

‘text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8’

wsgi.version

(1, 0)

HTTP_X_FORWARDED_FOR

‘24.135.98.203’

wsgi.errors

<open file ‘wsgi_errors’, mode ‘w’ at 0x7f535caaea50>

REMOTE_PORT

‘53723’

HTTP_ACCEPT_LANGUAGE

‘sr-RS,sr;q=0.9,en-US;q=0.8,en;q=0.7’

wsgi.run_once

False

CONTENT_TYPE

‘’

wsgi.file_wrapper

‘’

CSRF_COOKIE

u’eebJ6snHjxGazke3wpXnsnAEUHFnseP5’

HTTP_ACCEPT_ENCODING

‘gzip, deflate, br’

Settings

Using settings module kobo.settings

Setting Value

MARKITUP_FILTER

(‘markdown.markdown’, {‘safe_mode’: False})

MONTH_DAY_FORMAT

‘F j’

SECURE_BROWSER_XSS_FILTER

False

HAYSTACK_SIGNAL_MODELS

((‘kpi’, ‘Asset’), (‘kpi’, ‘Collection’), (‘taggit’, ‘Tag’))

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

‘en-us’

ROOT_URLCONF

‘kobo.urls’

CELERYD_TASK_TIME_LIMIT

2100

SKIP_HEAVY_MIGRATIONS

False

BROKER_URL

‘amqp://kpi:kpi@rabbit:5672/kpi’

BASE_DIR

‘/srv/src/kpi’

SILENCED_SYSTEM_CHECKS

[]

ACCOUNT_ACTIVATION_DAYS

3

MAXIMUM_EXPORTS_PER_USER_PER_FORM

10

SESSION_SERIALIZER

‘django.contrib.sessions.serializers.JSONSerializer’

STATIC_ROOT

‘/srv/src/kpi/staticfiles’

SYNC_KOBOCAT_XFORMS

True

ALLOWED_HOSTS

[’.my.org’]

MESSAGE_STORAGE

‘django.contrib.messages.storage.fallback.FallbackStorage’

EMAIL_SUBJECT_PREFIX

'[Django] ’

SERVER_EMAIL

‘kob…@kobo.my.org

SECURE_HSTS_SECONDS

0

STATICFILES_FINDERS

(‘django.contrib.staticfiles.finders.FileSystemFinder’,

‘django.contrib.staticfiles.finders.AppDirectoriesFinder’)

SESSION_CACHE_ALIAS

‘default’

SESSION_COOKIE_DOMAIN

‘.my.org

SESSION_COOKIE_NAME

‘kobonaut’

TIME_INPUT_FORMATS

(’%H:%M:%S’, ‘%H:%M:%S.%f’, ‘%H:%M’)

SECURE_REDIRECT_EXEMPT

[]

DATABASES

{‘default’: {‘ATOMIC_REQUESTS’: False,

‘AUTOCOMMIT’: True,

‘CONN_MAX_AGE’: 0,

‘ENGINE’: ‘django.db.backends.postgresql_psycopg2’,

‘HOST’: ‘postgres’,

‘NAME’: ‘kobotoolbox’,

‘OPTIONS’: {},

‘PASSWORD’: u’********************’,

‘PORT’: 5432,

‘TEST’: {‘CHARSET’: None,

‘COLLATION’: None,

‘MIRROR’: None,

‘NAME’: None},

‘TIME_ZONE’: ‘UTC’,

‘USER’: ‘kobo’}}

EMAIL_SSL_KEYFILE

u’********************’

TEMPLATE_DEBUG

True

FILE_UPLOAD_DIRECTORY_PERMISSIONS

None

FILE_UPLOAD_PERMISSIONS

None

MONGO_DB

Database(MongoClient(host=[‘mongo:27017’], document_class=dict, tz_aware=True, connect=False, j=True), u’formhub’)

FILE_UPLOAD_HANDLERS

(‘django.core.files.uploadhandler.MemoryFileUploadHandler’,

‘django.core.files.uploadhandler.TemporaryFileUploadHandler’)

DEFAULT_CONTENT_TYPE

‘text/html’

GIT_REV

{‘branch’: ‘master’,

‘long’: ‘a3ac18fdf6a4dda41af06dbaee29023b3f015cfa’,

‘short’: ‘a3ac18f’,

‘tag’: ‘2.018.10a’}

APPEND_SLASH

True

FIRST_DAY_OF_WEEK

0

DATABASE_ROUTERS

[]

DEFAULT_TABLESPACE

‘’

YEAR_MONTH_FORMAT

‘F Y’

MONGO_DATABASE

{‘HOST’: ‘mongo’,

‘NAME’: ‘formhub’,

‘PASSWORD’: u’********************’,

‘PORT’: 27017,

‘USER’: ‘’}

CACHES

{‘default’: {‘BACKEND’: ‘django.core.cache.backends.locmem.LocMemCache’}}

SESSION_COOKIE_PATH

‘/’

DEFAULT_DEPLOYMENT_BACKEND

‘kobocat’

SECURE_CONTENT_TYPE_NOSNIFF

False

MIDDLEWARE_CLASSES

(u’debug_toolbar.middleware.DebugToolbarMiddleware’,

‘django.contrib.sessions.middleware.SessionMiddleware’,

‘django.middleware.locale.LocaleMiddleware’,

‘django.middleware.common.CommonMiddleware’,

‘django.middleware.csrf.CsrfViewMiddleware’,

‘django.contrib.auth.middleware.AuthenticationMiddleware’,

‘django.contrib.messages.middleware.MessageMiddleware’,

‘django.middleware.clickjacking.XFrameOptionsMiddleware’,

‘hub.middleware.OtherFormBuilderRedirectMiddleware’)

USE_I18N

True

THOUSAND_SEPARATOR

‘,’

SECRET_KEY

u’********************’

ENKETO_SURVEY_ENDPOINT

‘api/v2/survey/all’

DEFAULT_INDEX_TABLESPACE

‘’

REGISTRATION_EMAIL_HTML

False

LOGGING_CONFIG

‘logging.config.dictConfig’

SIGNING_BACKEND

‘django.core.signing.TimestampSigner’

TEMPLATE_LOADERS

(‘django.template.loaders.filesystem.Loader’,

‘django.template.loaders.app_directories.Loader’)

WSGI_APPLICATION

‘kobo.wsgi.application’

INTERCOM_APP_ID

None

KOBO_SUPPORT_EMAIL

‘mobil…@my.org

X_FRAME_OPTIONS

‘SAMEORIGIN’

CSRF_COOKIE_NAME

‘csrftoken’

HAYSTACK_CONNECTIONS

{‘default’: {‘ENGINE’: ‘haystack.backends.whoosh_backend.WhooshEngine’,

‘PATH’: ‘/srv/whoosh/whoosh_index’}}

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

EMAIL_TIMEOUT

None

SECURE_SSL_HOST

None

DEFAULT_CHARSET

‘utf-8’

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

‘.my.org

FILE_CHARSET

‘utf-8’

DEBUG

True

PRIVATE_STORAGE_ROOT

‘/srv/src/kpi/media’

MONGO_CONNECTION

MongoClient(host=[‘mongo:27017’], document_class=dict, tz_aware=True, connect=False, j=True)

LANGUAGE_COOKIE_DOMAIN

None

DEFAULT_FILE_STORAGE

‘django.core.files.storage.FileSystemStorage’

INSTALLED_APPS

(‘django.contrib.auth’,

‘django.contrib.contenttypes’,

‘django.contrib.sessions’,

‘django.contrib.messages’,

‘django.contrib.staticfiles’,

‘reversion’,

‘debug_toolbar’,

‘mptt’,

‘haystack’,

‘private_storage’,

‘kobo.apps.KpiConfig’,

‘hub’,

‘loginas’,

‘webpack_loader’,

‘registration’,

‘django.contrib.admin’,

‘django_extensions’,

‘taggit’,

‘rest_framework’,

‘rest_framework.authtoken’,

‘oauth2_provider’,

‘markitup’,

‘django_digest’,

‘kobo.apps.superuser_stats’,

‘kobo.apps.service_health’,

‘guardian’)

LANGUAGES_BIDI

(‘he’, ‘ar’, ‘fa’, ‘ur’)

USE_L10N

True

ENKETO_SERVER

https://ee.my.org/

STATICFILES_DIRS

(’/srv/src/kpi/jsapp’,

‘/srv/src/kpi/static’,

(‘mocha’, ‘/srv/src/kpi/node_modules/mocha’))

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

(‘HTTP_X_FORWARDED_PROTO’, ‘https’)

LANGUAGE_COOKIE_AGE

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

INTERNAL_IPS

(u’::1’, u’127.0.0.1’)

SYNC_KOBOCAT_PERMISSIONS

True

GOOGLE_ANALYTICS_TOKEN

u’********************’

LOGIN_URL

‘/accounts/login/’

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

CELERYD_TASK_SOFT_TIME_LIMIT

1800

TIME_FORMAT

‘P’

AUTH_USER_MODEL

‘auth.User’

DATE_INPUT_FORMATS

(’%Y-%m-%d’,

‘%m/%d/%Y’,

‘%m/%d/%y’,

‘%b %d %Y’,

‘%b %d, %Y’,

‘%d %b %Y’,

‘%d %b, %Y’,

‘%B %d %Y’,

‘%B %d, %Y’,

‘%d %B %Y’,

‘%d %B, %Y’)

AUTHENTICATION_BACKENDS

(‘django.contrib.auth.backends.ModelBackend’,

‘kpi.backends.ObjectPermissionBackend’)

EMAIL_HOST_PASSWORD

u’********************’

PASSWORD_RESET_TIMEOUT_DAYS

u’********************’

SESSION_FILE_PATH

None

CACHE_MIDDLEWARE_ALIAS

‘default’

SESSION_SAVE_EVERY_REQUEST

False

STATICFILES_STORAGE

‘django.contrib.staticfiles.storage.StaticFilesStorage’

NUMBER_GROUPING

0

SESSION_ENGINE

‘django.contrib.sessions.backends.db’

CSRF_FAILURE_VIEW

‘django.views.csrf.csrf_failure’

CSRF_COOKIE_PATH

‘/’

LOGIN_REDIRECT_URL

‘/’

DECIMAL_SEPARATOR

‘.’

IGNORABLE_404_URLS

()

LOCALE_PATHS

(’/srv/src/kpi/locale’,)

KOBOCAT_INTERNAL_URL

https://kc.my.org

TEMPLATE_STRING_IF_INVALID

‘’

ENKETO_VERSION

‘express’

RAVEN_JS_DSN

None

LOGOUT_URL

‘/accounts/logout/’

EMAIL_USE_TLS

‘False’

FIXTURE_DIRS

()

EMAIL_HOST

kobo.my.org

DATE_FORMAT

‘N j, Y’

DKOBO_PREFIX

False

CAN_LOGIN_AS

<function at 0x7f53677720c8>

MEDIA_ROOT

‘/srv/src/kpi/media’

LANGUAGE_COOKIE_PATH

‘/’

DEFAULT_EXCEPTION_REPORTER_FILTER

‘django.views.debug.SafeExceptionReporterFilter’

ADMINS

()

SYNC_KOBOCAT_XFORMS_PERIOD_MINUTES

30

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

‘kob…@kobo.my.org

SECURE_HSTS_INCLUDE_SUBDOMAINS

False

REST_FRAMEWORK

{‘DEFAULT_AUTHENTICATION_CLASSES’: [‘rest_framework.authentication.SessionAuthentication’,

‘rest_framework.authentication.BasicAuthentication’,

‘rest_framework.authentication.TokenAuthentication’],

‘DEFAULT_PAGINATION_CLASS’: ‘kpi.serializers.Paginated’,

‘PAGE_SIZE’: 100,

‘URL_FIELD_NAME’: ‘url’}

KOBO_SUPPORT_URL

mailto:mobileda...@my.org

MEDIA_URL

‘/media/’

DATETIME_FORMAT

‘N j, Y, P’

TEMPLATE_DIRS

()

NATIVE_LANGUAGE_NAMES

{u’ku’: u’\u0643\u0648\u0631\u062f\u06cc’}

KOBOCAT_URL

https://kc.my.org

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

ENKETO_PREVIEW_URI

‘preview’

WHOOSH_PATH

‘/srv/whoosh/whoosh_index’

LOGGING

{}

SHORT_DATE_FORMAT

‘m/d/Y’

TEMPLATES

[]

EXPOSE_GIT_REV

False

TEST_RUNNER

‘kobo.settings.DoNotUseRunner’

CELERYD_MAX_TASKS_PER_CHILD

7

CACHE_MIDDLEWARE_KEY_PREFIX

u’********************’

SECURE_SSL_REDIRECT

False

TIME_ZONE

‘UTC’

REGISTRATION_AUTO_LOGIN

True

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

MANAGERS

()

EMAIL_BACKEND

‘django.core.mail.backends.smtp.EmailBackend’

ANONYMOUS_USER_ID

-1

CELERYD_MAX_CONCURRENCY

6

LANGUAGE_COOKIE_NAME

‘django_language’

EMAIL_USE_SSL

False

TEMPLATE_CONTEXT_PROCESSORS

(‘django.contrib.auth.context_processors.auth’,

‘django.template.context_processors.debug’,

‘django.template.context_processors.i18n’,

‘django.template.context_processors.media’,

‘django.template.context_processors.static’,

django.template.context_processors.tz’,

‘django.contrib.messages.context_processors.messages’,

‘kpi.context_processors.external_service_tokens’,

‘kpi.context_processors.email’,

‘kpi.context_processors.sitewide_messages’)

KPI_PREFIX

‘/’

MIGRATION_MODULES

{}

MONGO_CONNECTION_URL

‘mongodb://mongo:27017’

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

‘kobo.settings’

USE_ETAGS

False

LANGUAGES

[(‘en’, u’English’), (‘fr’, u’fran\xe7ais’)]

HAYSTACK_SIGNAL_PROCESSOR

‘kpi.haystack_utils.SignalProcessor’

FILE_UPLOAD_TEMP_DIR

None

CSRF_COOKIE_AGE

31449600

STATIC_URL

‘/static/’

WEBPACK_LOADER

{‘DEFAULT’: {‘BUNDLE_DIR_NAME’: ‘jsapp/compiled/’,

‘POLL_INTERVAL’: 0.5,

‘TIMEOUT’: 5}}

EMAIL_PORT

‘587’

PRIVATE_STORAGE_AUTH_FUNCTION

‘kpi.utils.private_storage.superuser_or_username_matches_prefix’

USE_TZ

True

SHORT_DATETIME_FORMAT

‘m/d/Y P’

TEST_NON_SERIALIZED_APPS

[]

ENKETO_API_TOKEN

u’********************’

PASSWORD_HASHERS

u’********************’

ABSOLUTE_URL_OVERRIDES

{}

KOBOCAT_DEFAULT_PERMISSION_CONTENT_TYPES

[(‘main’, ‘userprofile’),

(‘logger’, ‘xform’),

(‘api’, ‘project’),

(‘api’, ‘team’),

(‘api’, ‘organizationprofile’),

(‘logger’, ‘note’)]

CELERYBEAT_SCHEDULE

{‘sync-kobocat-xforms’: {‘options’: {‘expires’: 900.0,

‘queue’: ‘sync_kobocat_xforms_queue’},

‘schedule’: datetime.timedelta(0, 1800),

‘task’: ‘kpi.tasks.sync_kobocat_xforms’}}

UPCOMING_DOWNTIME

False

CACHE_MIDDLEWARE_SECONDS

600

EMAIL_SSL_CERTFILE

None

ALLOWED_ANONYMOUS_PERMISSIONS

(‘kpi.view_collection’, ‘kpi.view_asset’, ‘kpi.view_submissions’)

CSRF_COOKIE_HTTPONLY

False

DATETIME_INPUT_FORMATS

(’%Y-%m-%d %H:%M:%S’,

‘%Y-%m-%d %H:%M:%S.%f’,

‘%Y-%m-%d %H:%M’,

‘%Y-%m-%d’,

‘%m/%d/%Y %H:%M:%S’,

‘%m/%d/%Y %H:%M:%S.%f’,

‘%m/%d/%Y %H:%M’,

‘%m/%d/%Y’,

‘%m/%d/%y %H:%M:%S’,

‘%m/%d/%y %H:%M:%S.%f’,

‘%m/%d/%y %H:%M’,

‘%m/%d/%y’)

KOBO_SURVEY_PREVIEW_EXPIRATION

24

EMAIL_HOST_USER

‘kob…@kobo.my.org

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

You received this message because you are subscribed to the Google Groups “KoBoToolbox Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.