-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Revert "refactor: deprecate course_id from ModuleSystem [BD-13]" #31071
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
Conversation
|
@regisb, @ormsbee, I don't think this is the cause of this failure. I created this branch with local imports. Running Traceback (most recent call last):
File "./manage.py", line 103, in <module>
startup.run()
File "/openedx/edx-platform/lms/startup.py", line 20, in run
django.setup()
File "/openedx/venv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/openedx/venv/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/openedx/venv/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/opt/pyenv/versions/3.8.12/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/openedx/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 "/openedx/edx-platform/openedx/core/djangoapps/course_groups/cohorts.py", line 21, in <module>
from lms.djangoapps.courseware import courses
File "/openedx/edx-platform/lms/djangoapps/courseware/courses.py", line 62, in <module>
from openedx.features.course_experience.utils import is_block_structure_complete_for_assignments
File "/openedx/edx-platform/openedx/features/course_experience/utils.py", line 8, in <module>
from lms.djangoapps.course_api.blocks.api import get_blocks
File "/openedx/edx-platform/lms/djangoapps/course_api/blocks/api.py", line 10, in <module>
from openedx.core.djangoapps.discussions.transformers import DiscussionsTopicLinkTransformer
File "/openedx/edx-platform/openedx/core/djangoapps/discussions/transformers.py", line 6, in <module>
from openedx.core.djangoapps.discussions.models import DiscussionTopicLink, DiscussionsConfiguration
File "/openedx/edx-platform/openedx/core/djangoapps/discussions/models.py", line 309, in <module>
class ProviderFilter(StackedConfigurationModel):
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 113, in __new__
raise RuntimeError(
RuntimeError: Model class openedx.core.djangoapps.discussions.models.ProviderFilter doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.I also tried the branch from this PR ( Traceback (most recent call last):
File "./manage.py", line 103, in <module>
startup.run()
File "/openedx/edx-platform/lms/startup.py", line 20, in run
django.setup()
File "/openedx/venv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/openedx/venv/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/openedx/venv/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/opt/pyenv/versions/3.8.12/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/openedx/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 "/openedx/edx-platform/openedx/core/djangoapps/course_groups/cohorts.py", line 21, in <module>
from lms.djangoapps.courseware import courses
File "/openedx/edx-platform/lms/djangoapps/courseware/courses.py", line 52, in <module>
from lms.djangoapps.courseware.module_render import get_module
File "/openedx/edx-platform/lms/djangoapps/courseware/module_render.py", line 66, in <module>
from lms.djangoapps.lms_xblock.runtime import LmsModuleSystem
File "/openedx/edx-platform/lms/djangoapps/lms_xblock/runtime.py", line 20, in <module>
from xmodule.library_tools import LibraryToolsService # lint-amnesty, pylint: disable=wrong-import-order
File "/openedx/edx-platform/xmodule/library_tools.py", line 13, in <module>
from openedx.core.djangoapps.content_libraries import api as library_api
File "/openedx/edx-platform/openedx/core/djangoapps/content_libraries/api.py", line 78, in <module>
from openedx.core.djangoapps.content_libraries import permissions
File "/openedx/edx-platform/openedx/core/djangoapps/content_libraries/permissions.py", line 7, in <module>
from openedx.core.djangoapps.content_libraries.models import ContentLibraryPermission
File "/openedx/edx-platform/openedx/core/djangoapps/content_libraries/models.py", line 81, in <module>
class ContentLibrary(models.Model):
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 113, in __new__
raise RuntimeError(
RuntimeError: Model class openedx.core.djangoapps.content_libraries.models.ContentLibrary doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. |
|
Thanks for taking the time to troubleshoot this issue @ormsbee @Agrendalath, I appreciate it. As @Agrendalath discovered, I was wrong in my diagnosis, and the change does not fix my issue. This PR can safely be closed. For more details see this comment: overhangio/tutor#726 (comment) |
|
@Agrendalath did all the work. Thank you both for the great follow-up on this. Closing. |
Reverts #30715
Per @regisb: