• Members 7 posts
    Sept. 24, 2017, 12:47 a.m.

    Great project! Really hoping to use this in production for a class I'm teaching in a couple of weeks.

    I have a problem with setting DEBUG = False, which gives a 500 error, even with ALLOWED_HOSTS set to '*' or '127.0.0.1'.

    I'm using python 3.4.3 and Django 1.11.5. The error log is below.

    Any ideas would be wonderful!

    Austen

    [23/Sep/2017 22:27:03] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:27:03] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:27:03] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
    [23/Sep/2017 22:27:03] ERROR [django.request:135] Internal Server Error: /
    Traceback (most recent call last):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, callback_args, callback_kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args,
    kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request,
    args, kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
    return render(request, self.template_name, template_context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
    content = loader.render_to_string(template_name, context, request, using=using)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
    return template.render(context, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
    return self.template.render(context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
    with context.bind_template(self):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
    return next(self.gen)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
    context = processor(self.request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
    request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
    ret = super(Serializer, self).data
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
    self._data = self.to_representation(self.instance)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
    return method(value)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
    return serialize_acl(obj)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
    serializer(serialized_acl)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
    for category, acl in serialized_acl.pop('categories').items():
    AttributeError: 'list' object has no attribute 'items'
    [23/Sep/2017 22:27:03] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063
    [23/Sep/2017 22:27:09] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:27:09] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:27:09] ERROR [django.request:135] Internal Server Error: /
    Traceback (most recent call last):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args,
    callback_kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, args, kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args,
    kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
    return render(request, self.template_name, template_context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
    content = loader.render_to_string(template_name, context, request, using=using)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
    return template.render(context, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
    return self.template.render(context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
    with context.bind_template(self):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
    return next(self.gen)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
    context = processor(self.request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
    request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
    ret = super(Serializer, self).data
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
    self._data = self.to_representation(self.instance)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
    return method(value)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
    return serialize_acl(obj)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
    serializer(serialized_acl)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
    for category, acl in serialized_acl.pop('categories').items():
    AttributeError: 'list' object has no attribute 'items'
    [23/Sep/2017 22:27:09] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
    [23/Sep/2017 22:27:09] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063
    [23/Sep/2017 22:31:43] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:31:43] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:31:44] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
    [23/Sep/2017 22:31:44] ERROR [django.request:135] Internal Server Error: /
    Traceback (most recent call last):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request,
    callback_args, callback_kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args,
    kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, args, kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
    return render(request, self.template_name, template_context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
    content = loader.render_to_string(template_name, context, request, using=using)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
    return template.render(context, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
    return self.template.render(context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
    with context.bind_template(self):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
    return next(self.gen)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
    context = processor(self.request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
    request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
    ret = super(Serializer, self).data
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
    self._data = self.to_representation(self.instance)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
    return method(value)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
    return serialize_acl(obj)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
    serializer(serialized_acl)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
    for category, acl in serialized_acl.pop('categories').items():
    AttributeError: 'list' object has no attribute 'items'
    [23/Sep/2017 22:31:44] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063
    [23/Sep/2017 22:31:45] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:31:45] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [23/Sep/2017 22:31:45] ERROR [django.request:135] Internal Server Error: /
    Traceback (most recent call last):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args,
    callback_kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request,
    args, kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args,
    kwargs)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
    return render(request, self.template_name, template_context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
    content = loader.render_to_string(template_name, context, request, using=using)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
    return template.render(context, request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
    return self.template.render(context)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
    with context.bind_template(self):
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
    return next(self.gen)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
    context = processor(self.request)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
    request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
    ret = super(Serializer, self).data
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
    self._data = self.to_representation(self.instance)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
    return method(value)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
    return serialize_acl(obj)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
    serializer(serialized_acl)
    File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
    for category, acl in serialized_acl.pop('categories').items():
    AttributeError: 'list' object has no attribute 'items'
    [23/Sep/2017 22:31:45] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
    [23/Sep/2017 22:31:45] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063

  • arrow_forward

    Thread has been moved from Development Discussion.

  • Sept. 24, 2017, 1:20 a.m.

    Hey!

    The error you are reporting here is something that was experienced by other user few months ago. Back then I've kinda scuffed it away as possible misconfiguration, but if the issue returns, it may be worth further investigation.

    Could you describe the steps you've taken when setting up the site?

  • Sept. 24, 2017, 1:33 a.m.

    Actually, let's investigate this differently. ;)

    Could you instead edit your Misago installation? There's function called serialize_acl in misago/acl/api.py that runs this serialization via:

    for serializer in providers.get_type_serializers(target):
        serializer(serialized_acl)
    

    Could you edit this to:

    for serializer in providers.get_type_serializers(target):
        try:
            serializer(serialized_acl)
        except Exception as e:
            pass
    

    And post new error you are getting then? I've got hunch there's some edge-case error on Py3k in Misago that is hard to handle, causing cascade of crashes. Perhaps its about permissions for logging directory?

  • Members 7 posts
    Sept. 24, 2017, 7:46 p.m.

    OK, here's the error now:

    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] DEBUG [django.template:925] Exception while resolving variable 'depth' in template 'misago/threadslist/threads.html'.
    Traceback (most recent call last):
    File "/Users/austen/anaconda/envs/misagotest/lib/python3.4/site-packages/Django-1.11.5-py3.4.egg/django/template/base.py", line 882, in _resolve_lookup
    current = current[bit]
    TypeError: 'Category' object is not subscriptable

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/Users/austen/anaconda/envs/misagotest/lib/python3.4/site-packages/Django-1.11.5-py3.4.egg/django/template/base.py", line 890, in _resolve_lookup
    current = getattr(current, bit)
    AttributeError: 'Category' object has no attribute 'depth'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/Users/austen/anaconda/envs/misagotest/lib/python3.4/site-packages/Django-1.11.5-py3.4.egg/django/template/base.py", line 896, in _resolve_lookup
    current = current[int(bit)]
    ValueError: invalid literal for int() with base 10: 'depth'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/Users/austen/anaconda/envs/misagotest/lib/python3.4/site-packages/Django-1.11.5-py3.4.egg/django/template/base.py", line 903, in _resolve_lookup
    (bit, current)) # missing attribute
    django.template.base.VariableDoesNotExist: Failed lookup for key [depth] in 'None (will become top level category)'
    [24/Sep/2017 17:43:57] INFO [django.server:124] "GET / HTTP/1.1" 200 11253
    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] INFO [django.server:124] "GET /django-i18n.js?en-us HTTP/1.1" 200 3271
    [24/Sep/2017 17:43:57] WARNING [django.request:152] Not Found: /static/misago/css/misago.css
    [24/Sep/2017 17:43:57] WARNING [django.request:152] Not Found: /static/misago/img/site-logo.png
    [24/Sep/2017 17:43:57] WARNING [django.server:124] "GET /static/misago/css/misago.css HTTP/1.1" 404 9158
    [24/Sep/2017 17:43:57] WARNING [django.request:152] Not Found: /static/misago/js/misago.js
    [24/Sep/2017 17:43:57] WARNING [django.request:152] Not Found: /static/misago/img/site-icon.png
    [24/Sep/2017 17:43:57] WARNING [django.request:152] Not Found: /static/misago/js/vendor.js
    [24/Sep/2017 17:43:57] WARNING [django.server:124] "GET /static/misago/img/site-logo.png HTTP/1.1" 404 9158
    [24/Sep/2017 17:43:57] WARNING [django.server:124] "GET /static/misago/js/misago.js HTTP/1.1" 404 9158
    [24/Sep/2017 17:43:57] WARNING [django.server:124] "GET /static/misago/img/site-icon.png HTTP/1.1" 404 9158
    [24/Sep/2017 17:43:57] WARNING [django.server:124] "GET /static/misago/js/vendor.js HTTP/1.1" 404 9158
    [24/Sep/2017 17:43:57] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 17:43:57] WARNING [django.request:152] Not Found: /static/misago/js/misago.js
    [24/Sep/2017 17:43:57] WARNING [django.server:124] "GET /static/misago/js/misago.js HTTP/1.1" 404 9158

  • Sept. 24, 2017, 8:13 p.m.

    Allright!

    Could you please also tell me how many categories do you have defined in your admin control panel?

  • Sept. 24, 2017, 8:43 p.m.

    Also, if you edit category.depth to category.level in misago/templates/misago/threadslist/base.html does this fix the error?

  • Sept. 24, 2017, 9:57 p.m.

    On sidenote, how are you running your Misago instance? Is it via python.py manage.py runserver or via WSGI like Nginx + UWSGI or Apache with mod_wsgi?

  • Members 7 posts
    Sept. 24, 2017, 9:57 p.m.

    Yes, now with DEBUG = False I just get the errors below, which I assume is due to static/ not being populated correctly/

    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/js/misago.js
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/img/site-icon.png
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/css/misago.css
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/js/vendor.js
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/img/site-logo.png
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/js/misago.js HTTP/1.1" 404 8879
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/css/misago.css HTTP/1.1" 404 9158
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/js/vendor.js HTTP/1.1" 404 8879
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/img/site-icon.png HTTP/1.1" 404 8879
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/img/site-logo.png HTTP/1.1" 404 8879
    [24/Sep/2017 19:46:35] INFO [django.server:124] "GET / HTTP/1.1" 200 10974
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] WARNING [django.security.SuspiciousSession:117] Session data corrupted
    [24/Sep/2017 19:46:35] INFO [django.server:124] "GET /django-i18n.js?en-us HTTP/1.1" 200 3271
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/img/site-icon.png
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/img/site-logo.png
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/css/misago.css
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/img/site-icon.png HTTP/1.1" 404 9158
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/css/misago.css HTTP/1.1" 404 9158
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/img/site-logo.png HTTP/1.1" 404 9158
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/js/vendor.js
    [24/Sep/2017 19:46:35] WARNING [django.request:152] Not Found: /static/misago/js/misago.js
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/js/misago.js HTTP/1.1" 404 9158
    [24/Sep/2017 19:46:35] WARNING [django.server:124] "GET /static/misago/js/vendor.js HTTP/1.1" 404 9158

  • Sept. 24, 2017, 9:59 p.m.

    I'm guessing that error 500 happens in course of handling the WARNING [django.security.SuspiciousSession:117] Session data corrupted. Have you changed your SECRET_KEY after setting up your project?

  • Members 7 posts
    Sept. 24, 2017, 10 p.m.

    via python.py manage.py runserver, though I got the same behaviour deploying on Elastic Beanstalk.

  • Sept. 24, 2017, 10:10 p.m.

    I don't see 500 in latest log you've posted. Can you please confirm if you are still experiencing the crash?

  • Members 7 posts
    Sept. 24, 2017, 10:13 p.m.

    No, it disappeared after editing category.depth to category.level.

  • Sept. 24, 2017, 10:14 p.m.

    I'm wondering if issue was resolved because you've restarted the forum in meantime. Are you still seeing the Session data corrupted in your logs?

  • Members 7 posts
    Sept. 24, 2017, 10:27 p.m.

    I was restarting each time, but the only issue I'm getting now is the missing stuff in static/ when I run with DEBUG = False.

    What is your conclusion regarding the changes made in misago/templates/misago/threadslist/base.html and in misago/acl/api.py?

  • Sept. 24, 2017, 10:33 p.m.

    I was restarting each time, but the only issue I'm getting now is the missing stuff in static/ when I run with DEBUG = False.

    This is because you shouldn't run Django apps with runserver and DEBUG = False. You may force Django to serve those, but it will still be error-prone and simply dangerous as runserver is not multithreading and thus users will experience request data leaking from one user to other in multiuser enviroments.

    What is your conclusion regarding the changes made in misago/templates/misago/threadslist/base.html and in misago/acl/api.py?

    I'm still confused but I'm expecting that the change to acl/api.py to be one that actually fixed the crash, but in my eyes this is only sidestepping the problem. The template edit only fixed the unresolved name error, but those produce 500's only under very specific conditions, and your's isn't one.

    What's really happening here AFAIK is something causing debug toolbar to don't serialize user account, but instead serialize already serialized account, thus crashing with Error 500. I'll write this down and give this proper investigation once I'm finished with current task. Hopefully I'll deliver the proper fix by the 0.12.

    Still, thanks for helping out!