Grades file not generating (Juniper version)

Hi

I successfully upgraded to Juniper and went through the system checking if everything is all right.

I figured that when I click on “Generate grade reports” that no task is initiated and no report is created…


I attach the outcome of tutor local logs --tail=100 lms-worker

docker-compose -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local logs --tail 100 lms-worker
Attaching to tutor_local_lms-worker_1
lms-worker_1       |     R = retval = fun(*args, **kwargs)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/celery/app/trace.py", line 438, in __protected_call__
lms-worker_1       |     return self.run(*args, **kwargs)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks.py", line 206, in calculate_problem_grade_report
lms-worker_1       |     return run_main_task(entry_id, task_fn, action_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/runner.py", line 120, in run_main_task
lms-worker_1       |     task_progress = task_fcn(entry_id, course_id, task_input, action_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 721, in generate
lms-worker_1       |     return ProblemGradeReport()._generate(context)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 736, in _generate
lms-worker_1       |     self._upload(context, [success_headers] + success_rows, [error_headers] + error_rows)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 188, in _upload
lms-worker_1       |     upload_csv_to_report_store(success_rows, context.file_name, context.course_id, date)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/utils.py", line 39, in upload_csv_to_report_store
lms-worker_1       |     report_store = ReportStore.from_config(config_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 231, in from_config
lms-worker_1       |     return DjangoStorageReportStore.from_config(config_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 272, in from_config
lms-worker_1       |     getattr(settings, config_name).get('STORAGE_KWARGS'),
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 253, in __init__
lms-worker_1       |     self.storage = get_storage(storage_class, **storage_kwargs)
lms-worker_1       |   File "/openedx/edx-platform/openedx/core/storage.py", line 114, in get_storage
lms-worker_1       |     return get_storage_class(storage_class)(**kwargs)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/storages/backends/s3boto3.py", line 250, in __init__
lms-worker_1       |     check_location(self)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/storages/utils.py", line 88, in check_location
lms-worker_1       |     correct,
lms-worker_1       | django.core.exceptions.ImproperlyConfigured: S3Boto3Storage.location cannot begin with a leading slash. Found '/openedx/media/grades'. Use 'openedx/media/grades' instead.
lms-worker_1       | 2020-06-25 13:15:40,352 INFO 1 [celery.worker.strategy] [user None] strategy.py:60 - Received task: lms.djangoapps.instructor_task.tasks.calculate_grades_csv[3c66aad4-13b6-42b3-acbe-72801fb1689c]
lms-worker_1       | 2020-06-25 13:15:40,354 INFO 12 [edx.celery.task] [user None] tasks.py:185 - Task: 3c66aad4-13b6-42b3-acbe-72801fb1689c, InstructorTask ID: 33, Task type: graded, Preparing for task execution
lms-worker_1       | 2020-06-25 13:15:40,364 INFO 12 [edx.celery.task] [user None] runner.py:108 - Task: 3c66aad4-13b6-42b3-acbe-72801fb1689c, InstructorTask ID: 33, Course: course-v1:uqar+NM22+d55, Input: {}, Starting update (nothing graded yet)
lms-worker_1       | 2020-06-25 13:15:40,365 INFO 12 [edx.celery.task] [user None] grades.py:285 - Task: 3c66aad4-13b6-42b3-acbe-72801fb1689c, InstructorTask ID: 33, Course: course-v1:uqar+NM22+d55, Input: {}, Task type: graded, Starting grades
lms-worker_1       | 2020-06-25 13:15:40,380 INFO 12 [edx.celery.task] [user None] grades.py:285 - Task: 3c66aad4-13b6-42b3-acbe-72801fb1689c, InstructorTask ID: 33, Course: course-v1:uqar+NM22+d55, Input: {}, Task type: graded, Compiling grades
lms-worker_1       | 2020-06-25 13:15:40,381 INFO 12 [edx.celery.task] [user None] grades.py:522 - Task: 3c66aad4-13b6-42b3-acbe-72801fb1689c, InstructorTask ID: 33, Course: course-v1:uqar+NM22+d55, Input: {}, Task type: graded, Creating Course Grade without optimization
lms-worker_1       | 2020-06-25 13:15:40,443 INFO 12 [lms.djangoapps.grades.course_grade_factory] [user None] course_grade_factory.py:225 - Grades: Update, Course: course_key: course-v1:uqar+NM22+d55, version: 5ef3ff4d5ba95673ec656129, edited_on: 2020-06-25 01:35:09.783000+00:00, grading_policy: tPB1OfMdq5IlAF6nfglldDWm/XE=, User: 3, Course Grade: percent: 1.0, letter_grade: Pass, passed: True, persisted: False
lms-worker_1       | 2020-06-25 13:15:40,480 INFO 12 [lms.djangoapps.grades.course_grade_factory] [user None] course_grade_factory.py:225 - Grades: Update, Course: course_key: course-v1:uqar+NM22+d55, version: 5ef3ff4d5ba95673ec656129, edited_on: 2020-06-25 01:35:09.783000+00:00, grading_policy: tPB1OfMdq5IlAF6nfglldDWm/XE=, User: 5, Course Grade: percent: 1.0, letter_grade: Pass, passed: True, persisted: False
lms-worker_1       | 2020-06-25 13:15:40,514 INFO 12 [lms.djangoapps.grades.course_grade_factory] [user None] course_grade_factory.py:225 - Grades: Update, Course: course_key: course-v1:uqar+NM22+d55, version: 5ef3ff4d5ba95673ec656129, edited_on: 2020-06-25 01:35:09.783000+00:00, grading_policy: tPB1OfMdq5IlAF6nfglldDWm/XE=, User: 6, Course Grade: percent: 1.0, letter_grade: Pass, passed: True, persisted: False
lms-worker_1       | 2020-06-25 13:15:40,516 INFO 12 [edx.celery.task] [user None] grades.py:285 - Task: 3c66aad4-13b6-42b3-acbe-72801fb1689c, InstructorTask ID: 33, Course: course-v1:uqar+NM22+d55, Input: {}, Task type: graded, Uploading grades
lms-worker_1       | 2020-06-25 13:15:40,518 WARNING 12 [edx.celery.task] [user None] tasks_base.py:96 - Task (3c66aad4-13b6-42b3-acbe-72801fb1689c) failed
lms-worker_1       | Traceback (most recent call last):
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/celery/app/trace.py", line 240, in trace_task
lms-worker_1       |     R = retval = fun(*args, **kwargs)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/celery/app/trace.py", line 438, in __protected_call__
lms-worker_1       |     return self.run(*args, **kwargs)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks.py", line 189, in calculate_grades_csv
lms-worker_1       |     return run_main_task(entry_id, task_fn, action_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/runner.py", line 120, in run_main_task
lms-worker_1       |     task_progress = task_fcn(entry_id, course_id, task_input, action_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 415, in generate
lms-worker_1       |     return CourseGradeReport()._generate(context)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 430, in _generate
lms-worker_1       |     self._upload(context, success_headers, success_rows, error_headers, error_rows)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 485, in _upload
lms-worker_1       |     upload_csv_to_report_store([success_headers] + success_rows, 'grade_report', context.course_id, date)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/utils.py", line 39, in upload_csv_to_report_store
lms-worker_1       |     report_store = ReportStore.from_config(config_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 231, in from_config
lms-worker_1       |     return DjangoStorageReportStore.from_config(config_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 272, in from_config
lms-worker_1       |     getattr(settings, config_name).get('STORAGE_KWARGS'),
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 253, in __init__
lms-worker_1       |     self.storage = get_storage(storage_class, **storage_kwargs)
lms-worker_1       |   File "/openedx/edx-platform/openedx/core/storage.py", line 114, in get_storage
lms-worker_1       |     return get_storage_class(storage_class)(**kwargs)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/storages/backends/s3boto3.py", line 250, in __init__
lms-worker_1       |     check_location(self)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/storages/utils.py", line 88, in check_location
lms-worker_1       |     correct,
lms-worker_1       | django.core.exceptions.ImproperlyConfigured: S3Boto3Storage.location cannot begin with a leading slash. Found '/openedx/media/grades'. Use 'openedx/media/grades' instead.
lms-worker_1       | 2020-06-25 13:15:40,524 ERROR 1 [celery.worker.job] [user None] log.py:282 - Task lms.djangoapps.instructor_task.tasks.calculate_grades_csv[3c66aad4-13b6-42b3-acbe-72801fb1689c] raised unexpected: ImproperlyConfigured("S3Boto3Storage.location cannot begin with a leading slash. Found '/openedx/media/grades'. Use 'openedx/media/grades' instead.",)
lms-worker_1       | Traceback (most recent call last):
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/celery/app/trace.py", line 240, in trace_task
lms-worker_1       |     R = retval = fun(*args, **kwargs)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/celery/app/trace.py", line 438, in __protected_call__
lms-worker_1       |     return self.run(*args, **kwargs)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks.py", line 189, in calculate_grades_csv
lms-worker_1       |     return run_main_task(entry_id, task_fn, action_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/runner.py", line 120, in run_main_task
lms-worker_1       |     task_progress = task_fcn(entry_id, course_id, task_input, action_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 415, in generate
lms-worker_1       |     return CourseGradeReport()._generate(context)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 430, in _generate
lms-worker_1       |     self._upload(context, success_headers, success_rows, error_headers, error_rows)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py", line 485, in _upload
lms-worker_1       |     upload_csv_to_report_store([success_headers] + success_rows, 'grade_report', context.course_id, date)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/tasks_helper/utils.py", line 39, in upload_csv_to_report_store
lms-worker_1       |     report_store = ReportStore.from_config(config_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 231, in from_config
lms-worker_1       |     return DjangoStorageReportStore.from_config(config_name)
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 272, in from_config
lms-worker_1       |     getattr(settings, config_name).get('STORAGE_KWARGS'),
lms-worker_1       |   File "/openedx/edx-platform/lms/djangoapps/instructor_task/models.py", line 253, in __init__
lms-worker_1       |     self.storage = get_storage(storage_class, **storage_kwargs)
lms-worker_1       |   File "/openedx/edx-platform/openedx/core/storage.py", line 114, in get_storage
lms-worker_1       |     return get_storage_class(storage_class)(**kwargs)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/storages/backends/s3boto3.py", line 250, in __init__
lms-worker_1       |     check_location(self)
lms-worker_1       |   File "/openedx/venv/lib/python3.5/site-packages/storages/utils.py", line 88, in check_location
lms-worker_1       |     correct,
lms-worker_1       | django.core.exceptions.ImproperlyConfigured: S3Boto3Storage.location cannot begin with a leading slash. Found '/openedx/media/grades'. Use 'openedx/media/grades' instead.

Thanks for your help

HN

Are you using the Minio plugin? Did you enable it at some point? Please paste the output of the following commands:

tutor plugins list
tutor config printvalue OPENEDX_AWS_SECRET_ACCESS_KEY

(replace the output of the last command by asterisks if you’d like to keep this value secret)

Hi @regis

Here it is
tutor plugins list
xqueue==10.0.0
notes==10.0.0
minio==10.0.0
enablespecialexam==0.1.0
enablecertgenerinst==0.1.0
enableextention==0.1.0

OPENEDX_AWS_SECRET_ACCESS_KEY

NMAMyhXN**************

[Nota: Import and export course works fine as well as ORA]

This is an issue with the minio plugin. Can you please open a Github issue in the plugin repo? https://github.com/overhangio/tutor-minio/issues
Please add a detailed description as well as a link to this conversation.

@regis

I have added a Github issue in the plugin repo as suggested.

I am afraid the discussion image upload has an issue as well.

1 Open Discussion
2 Write a message
3 Upload image
4. When i check in minio.mydomain.com i see that the image has been uploaded
5. The image never shows in the Discussion message

This issue was much trickier. It is now fixed in v10.0.2.

Thank you @regis

Everything is back to work!

Cheers.