Skip to content

Investigate production ThreadedDict AttributeErrors #10341

Closed
@jimchamp

Description

@jimchamp

Problem

Sentry has logged a large number of AttributeErrors, with messages like:

  • 'ThreadedDict' object has no attribute 'site' (examples)
  • 'ThreadedDict' object has no attribute 'features'(examples: 1 2 3)

These occur when we try to access values in web.ctx (like web.ctx.site or web.ctx.features) that are seemingly not set.

Reproducing the bug

  1. Go to ...
  2. Do ...
  • Expected behavior:
  • Actual behavior:

Context

  • Browser (Chrome, Safari, Firefox, etc):
  • OS (Windows, Mac, etc):
  • Logged in (Y/N):
  • Environment (prod, dev, local): prod

Breakdown

It seems that their are a few classes of ThreadedDict AttributeErrors, each happening in different code paths. I think the first step should be to gather more information about each class of error, then determine how to proceed. There may be a general solution that gracefully handles all such errors, or we may need to fix each of these separately.

Requirements Checklist

  • [ ]

Related files

Stakeholders


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Metadata

Metadata

Assignees

Labels

Lead: @jimchampIssues overseen by Jim (Front-end Lead, BookNotes) [managed]Needs: InvestigationThis issue/PR needs a root-cause analysis to determine a solution. [managed]Needs: Staff / InternalReviewed a PR but don't have merge powers? Use this.Priority: 3Issues that we can consider at our leisure. [managed]Type: BugSomething isn't working. [managed]

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions