Hello everyone,
I’ve deployed with tutor the nutmeg version of openedx and I want to enable badges.
I’ve followed the steps mentioned on https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/enable_badging.html#enable-badges-in-studio-and-the-learning-management-system
and also i have followed the below openedx discussions:
set all below parameters in the common.py file to configure the badges in the lms:
"BADGR_USERNAME": "<your_username>",
"BADGR_PASSWORD": "<your_pass>",
"BADGR_TOKENS_CACHE_KEY": "<token_key>",
"BADGR_BASE_URL": "<badgr_url>",
"BADGR_ISSUER_SLUG": "badges",
"BADGR_ENABLE_NOTIFICATIONS": true
But when create a new course and register user and complete the course → click on request certificate button which is on the progress page facing below error, certificate is generated but because of this error
I can’t obtain any badges in the certificate and on profile page.
Error calling create_course_badge in Signal.send_robust() (400 Client Error: Bad Request for url: https://api.badgr.io/v2/badgeclasses//assertions)
lms-1 | Traceback (most recent call last):
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 581, in get_or_create
lms-1 | return self.get(**kwargs), False
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
lms-1 | raise self.model.DoesNotExist(
lms-1 | lms.djangoapps.certificates.models.GeneratedCertificate.DoesNotExist: GeneratedCertificate matching query does not exist.
lms-1 |
lms-1 | During handling of the above exception, another exception occurred:
lms-1 |
lms-1 | Traceback (most recent call last):
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 212, in send_robust
lms-1 | response = receiver(signal=self, sender=sender, **named)
lms-1 | File "/openedx/edx-platform/lms/djangoapps/certificates/models.py", line 1241, in create_course_badge
lms-1 | course_badge_check(user, course_key)
lms-1 | File "/openedx/edx-platform/lms/djangoapps/badges/utils.py", line 27, in wrapped
lms-1 | return function(*args, **kwargs)
lms-1 | File "/openedx/edx-platform/lms/djangoapps/badges/events/course_complete.py", line 134, in course_badge_check
lms-1 | badge_class.award(user, evidence_url=evidence)
lms-1 | File "/openedx/edx-platform/lms/djangoapps/badges/models.py", line 134, in award
lms-1 | return self.backend.award(self, user, evidence_url=evidence_url) # lint-amnesty, pylint: disable=no-member
lms-1 | File "/openedx/edx-platform/lms/djangoapps/badges/backends/badgr.py", line 339, in award
lms-1 | return self._create_assertion(badge_class, user, evidence_url)
lms-1 | File "/openedx/edx-platform/lms/djangoapps/badges/backends/badgr.py", line 189, in _create_assertion
lms-1 | self._log_if_raised(response, data)
lms-1 | File "/openedx/edx-platform/lms/djangoapps/badges/backends/badgr.py", line 95, in _log_if_raised
lms-1 | response.raise_for_status()
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/requests/models.py", line 960, in raise_for_status
lms-1 | raise HTTPError(http_error_msg, response=self)
please guide me on what can I do ….
Thanks in Advance