Skip to content

AttributeError: 'NoneType' object has no attribute 'get' #3116

@sentry

Description

@sentry

Sentry Issue: PYTHON-DJANGO-1EZ

AttributeError: 'NoneType' object has no attribute 'get'
(6 additional frame(s) were not displayed)
...
  File "reader/views.py", line 301, in base_props
    "notifications": profile.recent_notifications(scope=active_module).client_contents(),
  File "sefaria/model/notification.py", line 420, in client_contents
    return [n.client_contents() for n in self]
  File "sefaria/model/notification.py", line 420, in <listcomp>
    return [n.client_contents() for n in self]
  File "sefaria/model/notification.py", line 310, in client_contents
    annotate_sheet(n, n["content"]["sheet_id"])
  File "sefaria/model/notification.py", line 291, in annotate_sheet
    n["content"]["sheet_title"] = strip_tags(sheet_data.get("title", ""), remove_new_lines=True)

{'request_id': '2119c378-ba32-4ad6-97b7-aa4ea9d80217', 'code': 500, 'error': AttributeError("'NoneType' object has no attribute 'get'"), 'error_traceback': ['  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 185, in _get_response\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\n', '  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/django/views.py", line 84, in sentry_wrapped_callback\n    return callback(request, *args, **kwargs)\n', '  File "/usr/local/lib/python3.9/site-packages/django/utils/decorators.py", line 149, in _wrapped_view\n    response = view_func(request, *args, **kwargs)\n', '  File "/app/sourcesheets/views.py", line 72, in sheets_home_page\n    return menu_page(request, page="voices", title=title, desc=desc)\n', '  File "/app/sefaria/system/decorators.py", line 96, in wrapper\n    result = func(request, *args, **kwargs)\n', '  File "/app/reader/views.py", line 1140, in ...

Metadata

Metadata

Assignees

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