Skip to content

Cannot create Source entity (Error 500) #172

@jeyemwey

Description

@jeyemwey

Hi, I've tried to set up my own c3nav, but when I try to create a new source entity, I always get a 500 error.

The error in the log is:

ERROR 2024-04-22 20:10:48,279 django.request log Internal Server Error: /editor/sources/create
 Traceback (most recent call last):
   File "/app/env/lib/python3.11/site-packages/asgiref/sync.py", line 518, in thread_handler
     raise exc_info[1]
   File "/app/env/lib/python3.11/site-packages/django/core/handlers/exception.py", line 42, in inner
     response = await get_response(request)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/env/lib/python3.11/site-packages/asgiref/sync.py", line 518, in thread_handler
     raise exc_info[1]
   File "/app/env/lib/python3.11/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
     response = await wrapped_callback(
                ^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/env/lib/python3.11/site-packages/asgiref/sync.py", line 468, in __call__
     ret = await asyncio.shield(exec_coro)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/env/lib/python3.11/site-packages/asgiref/current_thread_executor.py", line 40, in run
     result = self.fn(*self.args, **self.kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/env/lib/python3.11/site-packages/asgiref/sync.py", line 522, in thread_handler
     return func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
   File "/app/env/lib/python3.11/site-packages/django/views/decorators/http.py", line 154, in inner
     response = func(request, *args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/c3nav/editor/views/base.py", line 50, in wrapped
     response = call_api_hybrid_view_for_html(func, request, *args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/c3nav/editor/views/base.py", line 283, in call_api_hybrid_view_for_html
     response = func(request, *args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/c3nav/editor/views/edit.py", line 385, in edit
     form = model.EditorForm(instance=obj, request=request, space_id=space_id,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/c3nav/editor/forms.py", line 132, in __init__
     sources = {s['name']: s for s in Source.objects.all().values('name', 'access_restriction_id',
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/app/c3nav/editor/wrappers.py", line 88, in __getattr__
     raise TypeError('Can not call %s.%s wrapped!' % (type(self), name))
 TypeError: Can not call <class 'c3nav.editor.wrappers.QuerySetWrapper'>.values wrapped!

I have started my instance with the compose.yaml file in deployments/docker with commit 3ad6631 . My c3nav.cfg file is completely empty.

Thank you for this awesome project, it has helped me navigate a lot of events now and I want to understand it more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions