#149 'Internal Server Error' when navigating to Notifications page. 1 year, 10 months ago

Comment by ~heavyrocks on ~tsileo/microblog.pub

That did it! Thanks again, my notifications page is back. Appreciate it.

#149 'Internal Server Error' when navigating to Notifications page. 1 year, 10 months ago

Comment by ~heavyrocks on ~tsileo/microblog.pub

Awesome, thanks so much. I'll give that a try shortly here.

#149 'Internal Server Error' when navigating to Notifications page. 1 year, 10 months ago

Comment by ~heavyrocks on ~tsileo/microblog.pub

Here is more of the log, thanks for any help.

INFO:     108.251.152.189:0 - "GET /admin/notifications HTTP/1.0" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 404, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/fastapi/applications.py", line 269, in __call__
    await super().__call__(scope, receive, send)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/applications.py", line 124, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/home/emge/source/microblog/./app/main.py", line 176, in __call__
    await self.app(scope, receive, send_wrapper)  # type: ignore
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/exceptions.py", line 93, in __call__
    raise exc
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in __call__
    await self.app(scope, receive, sender)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/routing.py", line 670, in __call__
    await route.handle(scope, receive, send)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/routing.py", line 266, in handle
    await self.app(scope, receive, send)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/routing.py", line 65, in app
    response = await func(request)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/fastapi/routing.py", line 227, in app
    raw_response = await run_endpoint_function(
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/fastapi/routing.py", line 160, in run_endpoint_function
    return await dependant.call(**values)
  File "/home/emge/source/microblog/./app/admin.py", line 749, in get_notifications
    tpl_resp = await templates.render_template(
  File "/home/emge/source/microblog/./app/templates.py", line 97, in render_template
    return _templates.TemplateResponse(
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/templating.py", line 98, in TemplateResponse
    return _TemplateResponse(
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/starlette/templating.py", line 37, in __init__
    content = template.render(context)
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "app/templates/notifications.html", line 13, in top-level template code
    {% if notif.is_new %}
  File "app/templates/layout.html", line 42, in top-level template code
    {% block content %}{% endblock %}
  File "app/templates/notifications.html", line 57, in block 'content'
    <a href="{{ url_for("admin_profile") }}?actor_id={{ notif.inbox_object.actor.ap_id }}">
  File "/home/emge/.cache/pypoetry/virtualenvs/microblogpub-mA8M5apf-py3.10/lib/python3.10/site-packages/jinja2/environment.py", line 485, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'None' has no attribute 'actor'

#149 'Internal Server Error' when navigating to Notifications page. 1 year, 10 months ago

Ticket created by ~heavyrocks on ~tsileo/microblog.pub

My microblog instance was offline for a period of time due to some configuration issues in my web server software. I finally got that fixed up and I'm getting an 'Internal Server Error' message when navigating to the notifications page. Every other page appears to be working just fine. I see the following error in the uvicorn.log:

INFO:     108.251.152.189:0 - "GET /admin/notifications HTTP/1.0" 500 Internal Server Error
ERROR:    Exception in ASGI application

But I'm not sure what to look at next.