[traceback] DoesNotExist: UserProfile matching query does not exist.

VERIFIED FIXED

Status

Participation Infrastructure
Phonebook
P1
blocker
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: retornam, Assigned: tofumatt)

Tracking

Details

(Whiteboard: [prod] [dev] [1.1.2], URL)

(Reporter)

Description

6 years ago
STR:
1) Visit https://mozillians-dev.allizom.org/en-US/search?q=a&limit=20
2) Select the user Aakash Desai

The folowing message and tracebacks are produced

We're Sorry, but Something Went Wrong!


Traceback (most recent call last):
  File "/data/www/mozillians-dev.allizom.org/mozillians/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File   "/data/www/mozillians-dev.allizom.org/mozillians/vendor/src/django/django/views/decorators/cache.py",  line 88, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File   "/data/www/mozillians-dev.allizom.org/mozillians/vendor/src/django/django/contrib/auth/decorators.py",  line 19, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/data/www/mozillians-dev.allizom.org/mozillians/apps/phonebook/views.py", line 60, in profile_uid
    return _profile(request, person, needs_master)
  File "/data/www/mozillians-dev.allizom.org/mozillians/apps/phonebook/views.py", line 101, in _profile
    groups = person.get_profile().groups.all()
  File "/data/www/mozillians-dev.allizom.org/mozillians/apps/larper/__init__.py", line 546, in get_profile
    return User.objects.get(email=self.username).get_profile()
  File "/data/www/mozillians-dev.allizom.org/mozillians/vendor/src/django/django/contrib/auth/models.py", line 343, in get_profile
    self._profile_cache = model._default_manager.using(self._state.db).get(user__id__exact=self.id)
  File "/data/www/mozillians-dev.allizom.org/mozillians/vendor/src/django/django/db/models/query.py", line 349, in get
    % self.model._meta.object_name)
DoesNotExist: UserProfile matching query does not exist.
(Reporter)

Comment 1

6 years ago
The url for the failing use account is https://mozillians-dev.allizom.org/en-US/u/9aaa92a066
https://mozillians-dev.allizom.org/en-US/u/7f3a67u000046, too.
Severity: normal → blocker
OS: Mac OS X → All
Hardware: x86 → All
Summary: DoesNotExist: UserProfile matching query does not exist. → [traceback] DoesNotExist: UserProfile matching query does not exist.
Target Milestone: --- → 1.1
(Assignee)

Comment 3

6 years ago
I'm pretty sure this is a result of a database that predates some of our automatic UserProfile creation. I'll write a job to cleanup all these LDAP profile that are missing valid Django objects.

But unless you just made these accounts this probably isn't as dire as it seems.
Assignee: nobody → tofumatt

Comment 4

6 years ago
Commit pushed to https://github.com/mozilla/mozillians

https://github.com/mozilla/mozillians/commit/7cfde9b2838dd7e7908c46cd4c9c2f04a24b8eb7
Collect all users and try to fix them (bug 699234)

This needs to be run on a server with no hard limit, so
we'll see about getting IT to run it after some temporary
config changes.
(Assignee)

Updated

6 years ago
Depends on: 699318
These 2 profiles are still producing the error:
https://mozillians-dev.allizom.org/en-US/u/9aaa92a066
https://mozillians-dev.allizom.org/en-US/u/7f3a67u000046
On prod:
https://mozillians.org//en-US/u/1e5c346d45
Whiteboard: [prod] [

Updated

6 years ago
Whiteboard: [prod] [ → [prod] [dev]
Moving to 1.2.
Target Milestone: 1.1 → 1.2
Priority: -- → P1
(Assignee)

Comment 8

6 years ago
https://github.com/mozilla/mozillians/commit/944a70ce81e9b251d151f5212923986a2c575cb5

This should solve the issue and log, in our graphite setup, when/where/how often the problems are happening.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
Whiteboard: [prod] [dev] → [prod] [dev] [1.1.2]
Target Milestone: 1.2 → 1.1
Verified FIXED; checked the URLs in comment 5, too.
Status: RESOLVED → VERIFIED

Updated

6 years ago
Component: mozillians.org → Phonebook
Product: Websites → Community Tools
QA Contact: mozillians-org → phonebook
Target Milestone: 1.1 → ---
Version: unspecified → other
You need to log in before you can comment on or make changes to this bug.