Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CourseOverview.DoesNotExist #291

Open
sentry-io bot opened this issue Feb 1, 2022 · 4 comments
Open

CourseOverview.DoesNotExist #291

sentry-io bot opened this issue Feb 1, 2022 · 4 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Feb 1, 2022

A missing CourseOverview should not crash the dashboard page. The error should be clearly logged, but the learner should still be able to load their dashboard.

Sentry Issue: OPENEDX-RESIDENTIAL-44A

CourseOverview.DoesNotExist: 
(14 additional frame(s) were not displayed)
...
  File "main.html.py", line 325, in render_body
    __M_writer(filters.decode.utf8(self.body()))
  File "dashboard.html.py", line 225, in render_body
    course_overview = CourseOverview.get_from_id(enrollment.course_id)
  File "openedx/core/lib/cache_utils.py", line 74, in decorator
    result = wrapped(*args, **kwargs)
  File "openedx/core/djangoapps/content/course_overviews/models.py", line 401, in get_from_id
    return course_overview or cls.load_from_module_store(course_id)
  File "openedx/core/djangoapps/content/course_overviews/models.py", line 343, in load_from_module_store
    raise cls.DoesNotExist()
@pdpinch
Copy link
Member

pdpinch commented Feb 4, 2022

@arslanashraf7 are you already working on this? Will your PR openedx#29834 fix it?

@arslanashraf7
Copy link

@pdpinch It is different than the other issue although in both cases the issue is CourseOverview object not available and the course is also not available in mongo.

In the PR you mentioned we caught and logged this exception inside the credit_service which updates the credits for a course for a student based on proctored exams. Somehow I'm seeing 500 response from Github on my PR file changes you mentioned but you can see the changes in this comparison link

This issue is related to the dashboard when it tried to load the enrolled courses and doesn't find the course. This is where it tries to do it. I also tried to reproduce it but the course just doesn't show on the dashboard locally without this error.

Based on the sentry logs I think the main problem here is the caching of APIs. Can be seen in cache_utils.

Did you happen to notice the steps in which it happens?

@pdpinch
Copy link
Member

pdpinch commented Feb 7, 2022

I couldn't tell you exactly, but it's happened on our Residential LMS. We had users enroll in courses in 2021, and then at the end of the year, we delete some of those courses. When those users return some of them get this error.

Is there a command to clear that cache? Maybe we should run that after the courses are deleted.

@asadiqbal08 asadiqbal08 self-assigned this May 9, 2022
@asadiqbal08
Copy link

asadiqbal08 commented May 11, 2022

@arslanashraf7 I was busy in provisioning Devstack, I just saw these comments and thinking as you worked over it earlier so you can either close it if nothing is producible or would you like to guide us about the command for clearing cache ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants