openedx / openedx/openedx-platform
xmlsec version mismatch issue
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
I have been getting an error in pylint tests when opening a PR for open-release/sumac.master branch. This is the stack trace:
Run pylint lms/djangoapps/badges/ lms/djangoapps/branding/ lms/djangoapps/bulk_email/ lms/djangoapps/bulk_enroll/ lms/djangoapps/bulk_user_retirement/ lms/djangoapps/ccx/ lms/djangoapps/certificates/ lms/djangoapps/commerce/ lms/djangoapps/course_api/ lms/djangoapps/course_blocks/ lms/djangoapps/course_home_api/ lms/djangoapps/course_wiki/ lms/djangoapps/coursewarehistoryextended/ lms/djangoapps/debug/ lms/djangoapps/courseware/ lms/djangoapps/course_goals/ lms/djangoapps/rss_proxy/
Traceback (most recent call last):
************* Module /home/runner/work/edx-platform/edx-platform/pylintrc
File "/opt/hostedtoolcache/Python/3.[11](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:12).11/x64/lib/python3.11/site-packages/pylint_django/checkers/foreign_key_strings.py", line 87, in open
django.setup()
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/__init__.py", line 19, in setup
pylintrc:1:0: W00[12](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:13): Unknown option value for '--disable', expected a valid pylint message and got 'broad-exception-raised' (unknown-option-value)
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/conf/__init__.py", line 82, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.11/x64/bin/pylint", line 8, in <module>
sys.exit(run_pylint())
^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/__init__.py", line 35, in run_pylint
PylintRun(argv or sys.argv[1:])
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/lint/run.py", line 212, in __init__
linter.check(args)
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 694, in check
with self._astroid_module_checker() as check_astroid_module:
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/contextlib.py", line [13](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:14)7, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 990, in _astroid_module_checker
checker.open()
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint_django/checkers/foreign_key_strings.py", line 1[14](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:15), in open
django.setup()
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
app_config.import_models()
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
self.models_module = import_module(models_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/bulk_email/models.py", line 22, in <module>
from openedx.core.djangoapps.course_groups.cohorts import get_cohort_by_name
File "/home/runner/work/edx-platform/edx-platform/openedx/core/djangoapps/course_groups/cohorts.py", line 21, in <module>
from lms.djangoapps.courseware import courses
File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/courseware/courses.py", line 28, in <module>
from lms.djangoapps.course_blocks.api import get_course_blocks
File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/course_blocks/api.py", line 13, in <module>
from openedx.features.content_type_gating.block_transformers import ContentTypeGateTransformer
File "/home/runner/work/edx-platform/edx-platform/openedx/features/content_type_gating/block_transformers.py", line 9, in <module>
from lms.djangoapps.course_blocks.transformers.user_partitions import UserPartitionTransformer
File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/course_blocks/transformers/user_partitions.py", line 6, in <module>
from lms.djangoapps.courseware.access import has_access
File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/courseware/access.py", line 31, in <module>
from lms.djangoapps.courseware.access_utils import (
File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/courseware/access_utils.py", line 12, in <module>
from enterprise.models import EnterpriseCourseEnrollment, EnterpriseCustomerUser
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/enterprise/models.py", line 43, in <module>
from enterprise import utils
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/enterprise/utils.py", line 1[15](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:16), in <module>
from common.djangoapps.third_party_auth.provider import Registry
File "/home/runner/work/edx-platform/edx-platform/common/djangoapps/third_party_auth/provider.py", line 10, in <module>
from common.djangoapps.third_party_auth.models import (
File "/home/runner/work/edx-platform/edx-platform/common/djangoapps/third_party_auth/models.py", line 21, in <module>
from social_core.backends.saml import SAMLAuth
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/social_core/backends/saml.py", line 13, in <module>
from onelogin.saml2.auth import OneLogin_Saml2_Auth
File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/onelogin/saml2/auth.py", line 12, in <module>
import xmlsec
xmlsec.Error: ([19](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:20), 'xmlsec library version mismatch.')
This seems to originate from the social-auth-core package but I am unable to resolve it. Any help would be appreciated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the listed pylint command, then trace the import path through common/djangoapps/third_party_auth/models.py, social_core.backends.saml, and onelogin.saml2.auth. Determine which dependency or CI environment causes the xmlsec library version mismatch; done means the pylint check completes without the xmlsec error and its reported configuration error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100